public static void insertUser(string email, string name, string password, string gender)
        {
            User users = UserFront.createUser(email, name, password, gender);

            db.Users.Add(users);
            db.SaveChanges();
        }
Пример #2
0
        public static void insertProduct(string name, int price, int stock, int typeId)
        {
            Product products = ProductFront.createProduct(name, price, stock, typeId);

            db.Products.Add(products);
            db.SaveChanges();
        }
        public static void insertType(string name, string desc)
        {
            ProductType types = TypeFront.createType(name, desc);

            db.ProductTypes.Add(types);
            db.SaveChanges();
        }