示例#1
0
        public IdentityUser GetIdentityUserByUserName(string noramlizedUserName)
        {
            var parameters = new QueryParameters
            {
                FilterSettings = FilterSettingsBuilder <User> .Create()
                                 .AddFilterRule(x => x.NormalizedUserName, FilterOperator.IsEqualTo, noramlizedUserName)
                                 .GetSettings()
            };

            var user = unitOfWork.GetSingleOrDefault <User>(parameters);

            return(mapper.Map <IdentityUser>(user));
        }