Exemple #1
0
        internal static Resident GetCurrentResidentUser(IResidentRepository repository, ApplicationUser appUser)
        {
            Resident resident = null;

            if (appUser != null && !(string.IsNullOrEmpty(appUser.UserName)) && appUser.ClassType.Equals("SgConAPI.Models.Resident"))
            {
                resident = repository.GetResidentByUserName(appUser.UserName);
            }
            return(resident);
        }