Example #1
0
        static void Main(string[] args)
        {
            var tph = new TPHContext();

            tph.Computers.Add(new Laptop()
            {
                price = 1000, description = "Standard Laptop", weight = 3
            });
            tph.SaveChanges();
            var tpt = new TPTContext();

            tpt.Computers.Add(new Laptop()
            {
                price = 1000, description = "Standard Laptop", weight = 1
            });
            tpt.SaveChanges();
            var tpc = new TPTContext();

            tpc.Computers.Add(new Laptop()
            {
                price = 1000, description = "Standard Laptop", weight = 1
            });
            tpc.SaveChanges();
        }
Example #2
0
        public static List <Root> TPH()
        {
            using var context = new TPHContext();

            return(context.Roots.ToList());
        }