public UserMaster MapToUserDto(InputUserMasterDto userEntity) { //map common fields var user = Mapper.Map <UserMaster>(userEntity); return(user); }
public int SaveUser(InputUserMasterDto model) { UserMaster user = new UserMaster(); user = _userMapper.MapToUserDto(model); _context.Users.Add(user); _context.SaveChanges(); return(user.ID); }