public List <Domain.Models.Locomotive> Read() { using (var context = new LocomotiveEFContext()) { context.Database.Log = Console.WriteLine; var locomotives = context.LocomotiveEF.ToList(); return(locomotives); } }
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); } }