Documentation

This example uses Oracle HR schema.

Code

Method to insert based on a model.

//Method to insert based on a model.
var Employee = new Employee();
Employee.FirstName = "Willian";
Employee.LastName = "Vale";
Employee.Email = "WVALE";
Employee.PhoneNumber = "123.123.9999";
Employee.HireDate = new DateTime(2000, 01, 01);
Employee.JobId = "IT_PROG";
Employee.Salary = 20000;
Employee.DepartmentId = 60;

using (var Ecrud = new ECRUD.OracleMapping())
{
    var Inserted = Ecrud.Insert(Employee, DataBase.HR);
}

Code Async

Method to insert based on a model.

//Method to insert based on a model.
var Employee = new Employee();
Employee.FirstName = "Willian";
Employee.LastName = "Vale";
Employee.Email = "WVALE";
Employee.PhoneNumber = "123.123.9999";
Employee.HireDate = new DateTime(2000, 01, 01);
Employee.JobId = "IT_PROG";
Employee.Salary = 20000;
Employee.DepartmentId = 60;

using (var ECRUD = new ECRUD.OracleMapping())
{
    var Inserted = await ECRUD.InsertAsync(Employee, DataBase.HR);
}