Пример #1
0
        public Model.Client Update(int id, ClientInsertUpdateRequest request)
        {
            var entity = _context.Client.Find(id);

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

            return(_mapper.Map <Model.Client>(entity));
        }
Пример #2
0
        public Model.Client Insert(ClientInsertUpdateRequest request)
        {
            var entity = _mapper.Map <Client>(request);

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

            return(_mapper.Map <Model.Client>(entity));
        }
Пример #3
0
 public Model.Client Update(int id, ClientInsertUpdateRequest request)
 {
     return(_service.Update(id, request));
 }
Пример #4
0
 public Model.Client Insert(ClientInsertUpdateRequest request)
 {
     return(_service.Insert(request));
 }