Esempio n. 1
0
        public Months GetMonthsByID(int id)
        {
            var dbContext = new MyProjectDBContext();
            var result    = dbContext.Months
                            .SingleOrDefault(u => u.MoId.Equals(id));

            return(result);
        }
Esempio n. 2
0
        public static IList <Periods> GetPeriods()
        {
            //var result = _months.Values.ToList();
            //result.ForEach(p => p.Type = _productTypes[p.TypeID]);
            var dbContext = new MyProjectDBContext();
            var result    = dbContext.Periods.OrderBy(Periods => Periods.PerNum).ToList();

            return(result);
        }
Esempio n. 3
0
        public static IList <Months> GetMonths()
        {
            //var result = _months.Values.ToList();
            //result.ForEach(p => p.Type = _productTypes[p.TypeID]);
            var dbContext = new MyProjectDBContext();
            var result    = dbContext.Months.OrderBy(Months => Months.MoNum).ToList();

            return(result);
        }
Esempio n. 4
0
 public DataSource(MyProjectDBContext dbContext)
 {
     _dbContext = dbContext;
 }