M
Matthias S.
Hi there,
I have added a database model to my application and dragged a couple of
tables on it. Then I wrote a couple of selects using LINQ to SQL and
everything works fine.
But I can't fingure out how to add new items. For example, I have a
table named ServiceLog. I thought I could just go like:
MyDataContext db = new MyDataContext();
db.ServiceLog.Add(new ServiceLog() {...});
But there is no such Add method. Either I've got complete wrong
expectations about how entities for the model are generated, or I made
a mistake. Can anyone help? Thanks in advance.
Matthias
--
I have added a database model to my application and dragged a couple of
tables on it. Then I wrote a couple of selects using LINQ to SQL and
everything works fine.
But I can't fingure out how to add new items. For example, I have a
table named ServiceLog. I thought I could just go like:
MyDataContext db = new MyDataContext();
db.ServiceLog.Add(new ServiceLog() {...});
But there is no such Add method. Either I've got complete wrong
expectations about how entities for the model are generated, or I made
a mistake. Can anyone help? Thanks in advance.
Matthias
--