public UserAccountDTO Create(UserAccountDTO modelDTO)
 {
     if (modelDTO != null)
     {
         var userAccount = UserAccountAssembler.ToEntity(modelDTO);
         return(UserAccountAssembler.ToDTO(userAccountRepo.CreateUserAccount(userAccount)));
     }
     return(null);
 }
示例#2
0
 public UserAccountDTO Create(UserAccountDTO oUserAccountDTO)
 {
     if (oUserAccountDTO != null)
     {
         oUserAccountRepo.CreateUserAccount(UserAccountAssembler.ToEntity(oUserAccountDTO));
         return(oUserAccountDTO);
     }
     return(null);
 }
        public UserAccountDTO Update(UserAccountDTO modelDTO)
        {
            UserAccountDTO returnUserAccount = null;

            if (modelDTO != null && (modelDTO.UserAccountID > 0 || modelDTO.UserName != null))
            {
                userAccountRepo.UpdateUserAccount(UserAccountAssembler.ToEntity(modelDTO));
                returnUserAccount = modelDTO;
            }

            return(returnUserAccount);
        }
示例#4
0
        public UserAccountDTO Update(UserAccountDTO oUserAccountDTO)
        {
            UserAccountDTO returnUserAccount = null;

            if (oUserAccountDTO != null && oUserAccountDTO.UserAccountID > 0)
            {
                oUserAccountRepo.UpdateUserAccount(UserAccountAssembler.ToEntity(oUserAccountDTO));
                returnUserAccount = oUserAccountDTO;
            }

            return(returnUserAccount);
        }
 public UserAccountDTO GetByUserID(int UserID)
 {
     return(UserAccountAssembler.ToDTO(userAccountRepo.GetUserAccountByUserID(UserID)));
 }