Esempio n. 1
0
        //Handles addition of vehicle in the database
        //No null check for argument since it is done before invokation of function
        static public void AddVehInDB(Vehicle veh)
        {
            CarInsuranceContext context = new CarInsuranceContext();

            context.Vehicles.Add(veh);
            context.SaveChanges();
        }
Esempio n. 2
0
        //Handles addition of insurance in the database
        //No null check for argument since it is done before invokation of function
        static public void AddInsuranceInDB(Insurance insure)
        {
            CarInsuranceContext context = new CarInsuranceContext();

            context.Insurances.Add(insure);
            context.SaveChanges();
        }
Esempio n. 3
0
        //Handles addition of customer in the database
        //No null check for argument since it is done before invokation of function
        static public void AddCustInDB(Customer cust)
        {
            CarInsuranceContext context = new CarInsuranceContext();

            context.Customers.Add(cust);
            context.SaveChanges();
        }