示例#1
0
        public CustomerEntity Get_Object_Customer_By_UserName(string userName)
        {
            if (dbContext == null)
            {
                dbContext = new FoodDeliveryEntities();
            }
            var obj = dbContext.GET_OBJECT_CUSTOMER_BY_USERNAME(userName).FirstOrDefault();

            CustomerEntity entity = new CustomerEntity
            {
                CustomerID = "" + obj.CustomerID,
                FullName   = obj.FullName,
                Address    = obj.Address,
                Email      = obj.Email,
                Mobile     = obj.Mobile,
                Avatar     = obj.Avatar,
                UserName   = obj.UserName,
                Password   = obj.Password,
                UserType   = obj.UserType,
            };


            return(entity);
        }