예제 #1
0
 public Owner Delete(int id)
 {
     var ownersRemoved = _PActx
         .Remove(new Owner { OwnerId = id }).Entity;
     _PActx.SaveChanges();
     return ownersRemoved;
 }
예제 #2
0
        public User DeleteUser(int id)
        {
            var user = _context.Remove(new User {
                Id = id
            }).Entity;

            _context.SaveChanges();
            return(user);
        }
예제 #3
0
        public Pet RemovePet(int id)
        {
            var pet = _context.Remove(new Pet {
                ID = id
            }).Entity;

            _context.SaveChanges();
            return(pet);
        }
예제 #4
0
        public Owner Delete(int id)
        {
            var ownerRemoved = _ctx.Remove(new Owner {
                OwnerId = id
            }).Entity;

            _ctx.SaveChanges();
            return(ownerRemoved);
        }
예제 #5
0
        public Owner RemoveOwner(int Id)
        {
            var owner = _context.Remove(new Owner {
                Id = Id
            }).Entity;

            _context.SaveChanges();
            return(owner);
        }
예제 #6
0
        public Pet Delete(int id)
        {
            var removed = _context.Remove(new Pet {
                Id = id
            }).Entity;

            _context.SaveChanges();
            return(removed);
        }
예제 #7
0
        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);
        }
예제 #9
0
        public PetEntity Delete(int Id)
        {
            var petsRemoved = _PActx
                              .Remove(new PetEntity {
                Id = Id
            }).Entity;

            _PActx.SaveChanges();
            return(petsRemoved);
        }
예제 #10
0
        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);
        }