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)); }
public Model.Address Insert(AddressInsertUpdateRequest request) { var entity = _mapper.Map <Address>(request); _context.Add(entity); _context.SaveChanges(); return(_mapper.Map <Model.Address>(entity)); }
public Model.Address Update(int id, AddressInsertUpdateRequest request) { return(_service.Update(id, request)); }
public Model.Address Insert(AddressInsertUpdateRequest request) { return(_service.Insert(request)); }