private void DataPortal_Fetch(UserPasswordCriteria criteria) { using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities> .GetManager(Database.ApplicationConnection, false)) { IQueryable <Data.User> query = ctx.ObjectContext.Users; if (criteria.Name != null) { query = query.Where(row => row.Name == criteria.Name); } if (criteria.Email != null) { query = query.Where(row => row.Email == criteria.Email); } var data = query.AsEnumerable().First(); this.Fetch(data); this.BusinessRules.CheckRules(); } }
private void DataPortal_Fetch(UserPasswordCriteria criteria) { using (var ctx = Csla.Data.ObjectContextManager<ApplicationEntities> .GetManager(Database.ApplicationConnection, false)) { IQueryable<Data.User> query = ctx.ObjectContext.Users; if (criteria.Name != null) { query = query.Where(row => row.Name == criteria.Name); } if (criteria.Email != null) { query = query.Where(row => row.Email == criteria.Email); } var data = query.AsEnumerable().First(); this.Fetch(data); this.BusinessRules.CheckRules(); } }
internal static UserPassword FetchUserPassword(UserPasswordCriteria criteria) { return Csla.DataPortal.Fetch<UserPassword>(criteria); }
internal static UserPassword FetchUserPassword(UserPasswordCriteria criteria) { return(Csla.DataPortal.Fetch <UserPassword>(criteria)); }