Creates a new shared database connection.
Наследование: IDisposable
Пример #1
0
 public Data GetDataById(int id)
 {
     using (DbConnectionScope scope = new DbConnectionScope())
     {
         return Repository.Get<IDataRepository>().LoadDataById(id);
     }
 }
Пример #2
0
 public Data GetDataById(int id)
 {
     using (DbConnectionScope scope = new DbConnectionScope())
     {
         return _repository.GetDataById(id);
     }
 }