public void StoredProcedure_builder_using_expression() { var product = Context.Sql("select * from Product where ProductId = 1") .QuerySingle <Product>(); product.Name = "The Warren Buffet Way"; var mysqlProduct = new MySqlProduct(product); var rowsAffected = Context.StoredProcedure <MySqlProduct>("ProductUpdate", mysqlProduct) .Parameter(x => x.ParamProductId) .Parameter(x => x.ParamName).Execute(); Assert.AreEqual(1, rowsAffected); }
public void StoredProcedure_builder_automapping() { var product = Context.Sql("select * from Product where ProductId = 1") .QuerySingle <Product>(); product.Name = "The Warren Buffet Way"; var mysqlProduct = new MySqlProduct(product); var rowsAffected = Context.StoredProcedure <MySqlProduct>("ProductUpdate", mysqlProduct) .AutoMap(x => x.ParamCategoryId).Execute(); Assert.AreEqual(1, rowsAffected); }