Products

Solutions

Learn More

Partners

Community

Blog

About

DAL 2 - IDataContext Interface

Return to previous page

  • 4/7/2015
  • 1662 Views

Comments

1662 Views

DAL 2 - IDataContext Interface

Last updated 5 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
The IDataContext interface describes the contract for the concrete PetaPocoDataContext implementation.

public interface IDataContext : IDisposable

{
void BeginTransaction();

void Commit();

void Execute(CommandType type, string sql, params object[] args);

IEnumerable<T> ExecuteQuery<T>(CommandType type, string sql, params object[] args);

T ExecuteScalar<T>(CommandType type, string sql, params object[] args);

T ExecuteSingleOrDefault<T>(CommandType type, string sql, params object[] args);

IRepository<T> GetRepository<T>() where T : class;

void RollbackTransaction();
}
Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  

What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out