コード例 #1
0
        public Entities.Owner UpdateOwner(Entities.Owner dbOwner, Entities.Owner owner)
        {
            _context.Attach(dbOwner);
            dbOwner.Name    = owner.Name;
            dbOwner.Address = owner.Address;

            _context.SaveChanges();

            return(dbOwner);
        }
コード例 #2
0
 public void DeleteOwner(Entities.Owner owner)
 {
     _context.Remove(owner);
     _context.SaveChanges();
 }
コード例 #3
0
 public Entities.Owner CreateOwner(Entities.Owner owner)
 {
     _context.Add(owner);
     _context.SaveChanges();
     return(owner);
 }