public IPager <Contact> FindAllView(IPager <Contact> pager)
        {
            string storedProcedure = String.Empty;

            //CMDText += ORDERBY_STMT + OrderBy;
            MapToObject = new ContactMapToObjectView(logger);

            storedProcedure = Settings.Database.StoredProcedures.FirstOrDefault(p => p == FINDALL_PAGEDVIEWPROC);
            if (storedProcedure == null)
            {
                SqlCommandType = Constants.DBCommandType.SQL;
                CMDText        = String.Format(FINDALLVIEWPAGER_STMT, pager.PageSize, pager.PageSize * pager.PageNbr);
                pager.Entities = base.FindAll();
            }
            else
            {
                SqlCommandType = Constants.DBCommandType.SPROC;
                CMDText        = storedProcedure;
                pager.Entities = base.FindAllPaged(pager.PageSize, pager.PageSize * pager.PageNbr);
            }

            CMDText        = FINDALLCOUNT_STMT;
            pager.RowCount = base.FindAllCount();
            return(pager);
        }
 public Contact FindViewByPK(IPrimaryKey pk)
 {
     SqlCommandType = Constants.DBCommandType.SQL;
     CMDText        = FINDBYPKVIEW_STMT;
     MapToObject    = new ContactMapToObjectView(logger);
     return(base.FindByPK(pk));
 }
Esempio n. 3
0
 public async Task <ICollection <Contact> > FindAllView()
 {
     CMDText     = FINDALLVIEW_STMT;
     CMDText    += ORDERBY_STMT + OrderBy;
     MapToObject = new ContactMapToObjectView(logger);
     return(await base.FindAll());
 }
 public ICollection <Contact> FindAllView()
 {
     SqlCommandType = Constants.DBCommandType.SQL;
     CMDText        = FINDALLVIEW_STMT;
     //CMDText += ORDERBY_STMT + OrderBy;
     MapToObject = new ContactMapToObjectView(logger);
     return(base.FindAll());
 }
Esempio n. 5
0
 public async Task <Contact> FindViewByPK(IPrimaryKey pk)
 {
     CMDText     = FINDBYPKVIEW_STMT;
     MapToObject = new ContactMapToObjectView(logger);
     return(await base.FindByPK(pk));
 }