예제 #1
0
        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();
            }
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
 internal static UserPassword FetchUserPassword(UserPasswordCriteria criteria)
 {
     return Csla.DataPortal.Fetch<UserPassword>(criteria);
 }
예제 #4
0
 internal static UserPassword FetchUserPassword(UserPasswordCriteria criteria)
 {
     return(Csla.DataPortal.Fetch <UserPassword>(criteria));
 }