예제 #1
0
        public Model.Address Update(int id, AddressInsertUpdateRequest request)
        {
            var entity = _context.Address.Find(id);

            _mapper.Map(request, entity);
            _context.SaveChanges();

            return(_mapper.Map <Model.Address>(entity));
        }
예제 #2
0
        public Model.Address Insert(AddressInsertUpdateRequest request)
        {
            var entity = _mapper.Map <Address>(request);

            _context.Add(entity);
            _context.SaveChanges();

            return(_mapper.Map <Model.Address>(entity));
        }
예제 #3
0
 public Model.Address Update(int id, AddressInsertUpdateRequest request)
 {
     return(_service.Update(id, request));
 }
예제 #4
0
 public Model.Address Insert(AddressInsertUpdateRequest request)
 {
     return(_service.Insert(request));
 }