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