public override Account getElementById(object id) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); var oData = oEntities.SP_GETELEMENTBYID_USER((int)id).ToList(); 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 }; if (oUser.Sex == 0) { oUser.DisplaySex = "Nam"; } else if (oUser.Sex == 1) { oUser.DisplaySex = "Nữ"; } return(oUser); } return(null); }