public SecurityViewModel Update(SecurityViewModel entity) { var result = _securityDomainService.Update(Mapper.Map<SecurityViewModel, Security>(entity)); return Mapper.Map<Security, SecurityViewModel>(result); }
public SecurityViewModel Add(SecurityViewModel entity) { var domainEntity = Mapper.Map<SecurityViewModel, Security>(entity); return Mapper.Map<Security, SecurityViewModel>(_securityDomainService.Add(domainEntity)); }