Beispiel #1
0
        public IHttpActionResult Get()
        {
            IUserBDC userBDC = (IUserBDC)BDCFactory.Instance.Create(BDCType.UserBDC);
            OperationResult <IList <IUserDTO> > retVal = userBDC.GetAll();
            IList <UserDTO> temp = new List <UserDTO>();

            if (retVal.IsValid())
            {
                foreach (var item in retVal.Data)
                {
                    UserDTO userDTO = new UserDTO();
                    userDTO.UserID         = item.UserID;
                    userDTO.UserName       = item.UserName;
                    userDTO.AccountBalance = item.AccountBalance;
                    userDTO.BlockedAmount  = item.BlockedAmount;
                    userDTO.Contact        = item.Contact;
                    userDTO.DOB            = item.DOB;
                    userDTO.Email          = item.Email;
                    userDTO.UniqueUserId   = item.UniqueUserId;
                    userDTO.image          = item.image;
                    userDTO.file           = null;
                    temp.Add(userDTO);
                }
            }


            return(Ok(temp));
        }