LINQ to SQL NullReferenceException gotcha(blog.andrei.rinea.ro)
submitted by
AndreiR23(75) 2 years, 5 months ago
In my DAL (Data Access Layer) assembly (a LINQ-to-SQL centric assembly) I used to insert object into the database like this
public void CreateMessage(MyApp.Entities.Message message)
{
Message m = new Message(); // this is the LINQ-to-SQL generated Message class not the business entity class
m.UserId = message.UserId;
//... set all the properties accordingly
DataContext ctx = new DataCo...
|category: ADO.NET
|Views: 16
tags:
ADO.NET Database another
Everyones tags:
Your Tags: