Creates a new shared database connection.
Inheritance: IDisposable
Exemple #1
0
 public Data GetDataById(int id)
 {
     using (DbConnectionScope scope = new DbConnectionScope())
     {
         return Repository.Get<IDataRepository>().LoadDataById(id);
     }
 }
Exemple #2
0
 public Data GetDataById(int id)
 {
     using (DbConnectionScope scope = new DbConnectionScope())
     {
         return _repository.GetDataById(id);
     }
 }