public List <T> Get <T>(IPMSELT entity) where T : class, IPMSELT { string databaseId = this.Scene.Context.RoadWayDatabaseId; string databaseName = databaseId.GetDatbaseNameById(); using (IRoadsDao dao = this.Scene.Dal.RoadsDao) { dao.DataSource = databaseName; using (IDbConnection conn = dao.IHPMS.OpenDbConnection()) { //return conn.SelectFmt<T>("SELECT * FROM PMSELTS WHERE UPDATE_MULT = -1"); if (entity.UPDATE_MULT != null) { return(conn.Select <T>(q => q.UPDATE_MULT == entity.UPDATE_MULT)); } else if (entity.STND_NAME != null) { return(conn.Select <T>(q => q.STND_NAME == entity.STND_NAME)); } return(conn.Select <T>()); } } }
public List <T> Get <T>(IPMSELT entity) where T : class, IPMSELT { return(this.Scene.Dal.PmseltsRepository.Get <T>(entity)); }