Ejemplo n.º 1
0
 //static????
 public static List<Entity01> DemoGetEntity01sFromToday( )
 {
     using (var repo = new RepoEntity01( UOW.Create( ) ))
     {
         return repo.GetActive().Where(x => x.date1 == DateTime.Now).ToList();
     }
 }
Ejemplo n.º 2
0
 //static????
 public static List<Entity01> DemoGetDeletedEntity01s( )
 {
     using (var repo = new RepoEntity01( UOW.Create( ) ))
     {
         return repo.GetDeleted().ToList( );
     }
 }
Ejemplo n.º 3
0
 //static????
 public static List<Entity01> DemoGetEntity01sById( int id )
 {
     using (var repo = new RepoEntity01( UOW.Create( ) ))
     {
         return repo.GetActive( ).Where( x => x.Id == id ).ToList( );
     }
 }
Ejemplo n.º 4
0
 public static PaginationOUT getEntity01Table( PaginationIN p_in )
 {
     using (var repo = new RepoEntity01( UOW.Create( ) ))
     {
         var InitialQuery = repo.GetActive().Where( x => x.name != "bb" );
         var result = Pagination.GetPageData( InitialQuery, p_in );
         return result;
     }
 }
Ejemplo n.º 5
0
        public static void DemoMultipleRepos( int id )
        {
            //Demo: gebruik van meerdere Repo's binnen één transactie;

            using (var repo01 = new RepoEntity01( UOW.Create( ) ))
            {
                var list01 = repo01.GetActive( ).ToList( );

                var repo02 = new RepoEntity02( repo01.UnitOfWork );

                var entity01 = new Entity02( );
                repo02.Update( entity01 );
            }
        }