Exemplo n.º 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();
 }
Exemplo n.º 2
0
 partial void UpdateOrganization(Organization instance);
Exemplo n.º 3
0
 partial void DeleteOrganization(Organization instance);
Exemplo n.º 4
0
 partial void InsertOrganization(Organization instance);