Esempio n. 1
0
        public List <Domain.Models.Locomotive> Read()
        {
            using (var context = new LocomotiveEFContext())
            {
                context.Database.Log = Console.WriteLine;

                var locomotives = context.LocomotiveEF.ToList();

                return(locomotives);
            }
        }
Esempio n. 2
0
        public Domain.Models.Locomotive Read(int identifier)
        {
            using (var context = new LocomotiveEFContext())
            {
                context.Database.Log = Console.WriteLine;

                var locomotive = context.LocomotiveEF.Find(identifier);

                return(locomotive);
            }
        }