Exemple #1
0
 public void Add(Pet newModel)
 {
     _ctx.Attach(newModel).State = EntityState.Added;
     _ctx.Entry(newModel).Collection(o => o.PreviousOwner).IsModified = true;
     _ctx.SaveChanges();
 }
 public void Add(Owner newModel)
 {
     _ctx.Attach(newModel).State = EntityState.Added;
     _ctx.SaveChanges();
 }
Exemple #3
0
 public void Add(User entity)
 {
     _ctx.Users.Add(entity);
     _ctx.SaveChanges();
 }