Пример #1
0
 /// <summary>
 /// Adds Organization to DB and submit changes
 /// </summary>
 /// <param name="model"></param>
 public void Save(Organization model)
 {
     var db = _dataContext.GetTable<Organization>();
     if(model.Id < 1)
     {
         db.InsertOnSubmit(model);
     } else
     {
         //Organization record = db.SingleOrDefault(x => x.Id == model.Id);
         db.Attach(model);
         //record = model;
     }
     db.Context.SubmitChanges();
 }
Пример #2
0
 partial void UpdateOrganization(Organization instance);
Пример #3
0
 partial void DeleteOrganization(Organization instance);
Пример #4
0
 partial void InsertOrganization(Organization instance);