forked from flq/Simple.Data.Oracle
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
flq edited this page May 11, 2011
·
5 revisions
The provider contained in the .NET framework is practically not maintained anymore, in fact in .NET 4.0 it is already marked as obsolete. Use the one provided by Oracle.
In this situation, use a double-underscore to separate the package name from the procedure name:
var result = _db.Department__Department_Count();
When inserting use the Sequence.Next("Seq_name")
or Sequence.Current("Seq_name")
in your insert statement, e.g.
using (var tx = _db.BeginTransaction())
{
tx.Departments.Insert(
DepartmentId: Sequence.Next("DEPARTMENTS_SEQ"),
DepartmentName: "Sky",
ManagerId: 100,
LocationId: 1000);
tx.Employees.Insert(
EmployeeId: Sequence.Next("EMPLOYEES_SEQ"),
LastName: "Brannigan",
Email: "[email protected]",
HireDate: new DateTime(2011,1,1),
JobId: "AD_ASST",
DepartmentId: Sequence.Current("DEPARTMENTS_SEQ"));
tx.Commit();
}