public override List <Account> CheckElementByObject(Account oT) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); var oData = oEntities.SP_CHECK_LOGIN(oT.UserName, oT.Password).ToList(); List <Account> lisUser = new List <Account>(); foreach (var o in oData) { Account oUser = new Account { UserId = o.UserId, UserName = o.UserName, Password = o.Password, Email = o.Email, DisplayName = o.DisplayName, IsSuperUser = o.IsSuperUser, Sex = o.Sex, Phone = o.Phone, isSuccess = true, isAdmin = o.isAdmin }; if (oUser.Sex == 0) { oUser.DisplaySex = "Nam"; } else if (oUser.Sex == 1) { oUser.DisplaySex = "Nữ"; } lisUser.Add(oUser); break; } return(lisUser.Count <= 0 ? null : lisUser); }