public Owner Delete(int id) { var ownersRemoved = _PActx .Remove(new Owner { OwnerId = id }).Entity; _PActx.SaveChanges(); return ownersRemoved; }
public User DeleteUser(int id) { var user = _context.Remove(new User { Id = id }).Entity; _context.SaveChanges(); return(user); }
public Pet RemovePet(int id) { var pet = _context.Remove(new Pet { ID = id }).Entity; _context.SaveChanges(); return(pet); }
public Owner Delete(int id) { var ownerRemoved = _ctx.Remove(new Owner { OwnerId = id }).Entity; _ctx.SaveChanges(); return(ownerRemoved); }
public Owner RemoveOwner(int Id) { var owner = _context.Remove(new Owner { Id = Id }).Entity; _context.SaveChanges(); return(owner); }
public Pet Delete(int id) { var removed = _context.Remove(new Pet { Id = id }).Entity; _context.SaveChanges(); return(removed); }
public Owner DeleteOwner(int id) { var ownerRemoved = _ptx.Remove <Owner>(new Owner { id = id }).Entity; _ptx.SaveChanges(); return(ownerRemoved); }
public Pet Delete(int id) { var petRemoved = _ctx.Remove(new Pet { PetId = id }).Entity; _ctx.SaveChanges(); return(petRemoved); }
public PetEntity Delete(int Id) { var petsRemoved = _PActx .Remove(new PetEntity { Id = Id }).Entity; _PActx.SaveChanges(); return(petsRemoved); }
public Pet Delete(int id) { // var petsToRemove = _ptx.Pets.Where(p => p.Id == id); //_ptx.RemoveRange(petsToRemove); var petRemoved = _ptx.Remove <Pet>(new Pet { Id = id }).Entity; _ptx.SaveChanges(); return(petRemoved); }