public void AddItem(TVItem item) { using (var context = new TVItemsDataContext(_connectionString)) { context.TVItems.InsertOnSubmit(item); context.SubmitChanges(); } }
public void UpdateItem(TVItem item) { using (var context = new TVItemsDataContext(_connectionString)) { context.TVItems.Attach(item); context.Refresh(RefreshMode.KeepCurrentValues, item); context.SubmitChanges(); } }
partial void DeleteTVItem(TVItem instance);
partial void UpdateTVItem(TVItem instance);
partial void InsertTVItem(TVItem instance);