public CurrentProfileSession(ProfileModelSignatureDto profileData) { ProfileId = profileData.ID; Role = profileData.Role; LoginName = profileData.LoginName; DisplayName = profileData.DisplayName; }
public ProfileModelSignatureDto GetByNameSignature(string userName) { try { using (var session = DataAccess.OpenSession()) { var profiles = (List<ProfileModel>)session.CreateQuery(new QueryProfilesByName(userName).Query).List<ProfileModel>(); return ProfileModelSignatureDto.Map(profiles.First()); } } catch (Exception ex) { Logger.Error("Error : ProfileService.GetByName - {0}", ex.Message); return null; } }