public Task <int> Add(EmployeeModel model) { string sql = @"insert into employees_table (FirstName, LastName, MiddleName, EmployeePosition) values (@FirstName, @LastName, @MiddleName, @EmployeePosition); select scope_identity()"; return(_db.InsertDataIntoDatabase(sql, model)); }
public Task <int> Add(ProductCompositionsModel model) { string sql = @"insert into product_compositions (ProductId, ProductComposition) values (@ProductId, @ProductComposition); select scope_identity()"; return(_db.InsertDataIntoDatabase(sql, model)); }
public Task <int> Add(PartnerProductModel model) { string sql = @"insert into partner_products (ProductId, ProductPartnerPrice, ProductCount) values (@ProductId, @ProductPartnerPrice, @ProductCount); select scope_identity()"; return(_db.InsertDataIntoDatabase(sql, model)); }
public Task <int> Add(ProductRecipeModel model) { string sql = @"insert into product_recipes (ProductId, ProductRecipe) values (@ProductId, @ProductRecipe); select scope_identity()"; return(_db.InsertDataIntoDatabase(sql, model)); }
public Task <int> AddOrder(OrderModel order) { string sql = @"insert into orders (ClientId, Sum, OrderTime, StatusId, OrderContents, EmployeeId) values (@ClientId, @Sum, @OrderTime, @StatusId, @OrderContents, @EmployeeId); select scope_identity()"; return(_db.InsertDataIntoDatabase(sql, order)); }
public Task <int> AddProduct(MenuProductModel product) { string sql = "insert into products_table (ProductName, ProductPrice, ProductDescription, ProductMarks) values (@ProductName, @ProductPrice, @ProductDescription, @ProductMarks); select scope_identity()"; return(_db.InsertDataIntoDatabase(sql, product)); }
public Task <int> AddClient(ClientModel client) { string sql = "insert into table_clients (Name, Address, PhoneNumber) values (@Name, @Address, @PhoneNumber); select scope_identity()"; return(_db.InsertDataIntoDatabase(sql, client)); }