private static IRnowDeploymentScheduleService GetRnowDeploymentScheduleService() { IDbContextFactory dbcontext = new DbContextFactory(); IRepository<RnowDeploymentSchedule> re = new Repository<RnowDeploymentSchedule>(dbcontext); IRnowDeploymentScheduleService service = new RnowDeploymentScheduleService(null, re, null); return service; }
public static List<int> GetSnowIds() { IDbContextFactory dbcontext = new DbContextFactory(); IRepository<Rnow> rnowRepository = new Repository<Rnow>(dbcontext); IRnowService service = new RnowService(null, rnowRepository, null,null); return ( List<int>) service.GetAll().Where(c => c.strStatus.ToLower() != "approved" && c.strStatus.ToLower() != "cancelled" && c.strStatus.ToLower() != "error" ).Select(c => c.intSnowID).Distinct().ToList(); }