public void Add(Owner newModel) { _ctx.Attach(newModel).State = EntityState.Added; _ctx.SaveChanges(); }
public void Add(Pet newModel) { _ctx.Attach(newModel).State = EntityState.Added; _ctx.Entry(newModel).Collection(o => o.PreviousOwner).IsModified = true; _ctx.SaveChanges(); }