コード例 #1
0
ファイル: Repository.cs プロジェクト: TroianArt/fundsManager
 /// <summary>
 /// Initializes a new instance of the <see cref="Repository{T}"/> class.
 /// </summary>
 /// <param name="context">context</param>
 public Repository(FundsContext context)
 {
     this.context = context;
     this.dbSet   = this.context.Set <T>();
 }
コード例 #2
0
ファイル: Repository.cs プロジェクト: TroianArt/fundsManager
 /// <summary>
 /// Initializes a new instance of the <see cref="Repository{T}"/> class.
 /// </summary>
 public Repository()
 {
     this.context = new FundsContext();
     this.dbSet   = this.context.Set <T>();
     this.dbSet.Load();
 }
コード例 #3
0
ファイル: UnitOfWork.cs プロジェクト: TroianArt/fundsManager
 /// <summary>
 /// Constructor by default
 /// </summary>
 public UnitOfWork()
 {
     this.context = new FundsContext();
 }
コード例 #4
0
ファイル: UnitOfWork.cs プロジェクト: TroianArt/fundsManager
 /// <summary>
 /// Constructor with paramethr
 /// </summary>
 /// <param name="context">context</param>
 public UnitOfWork(FundsContext context)
 {
     this.context = context;
 }
コード例 #5
0
ファイル: FundsController.cs プロジェクト: Jethrotul/wfunds
 public FundsController(FundsContext fundsContext)
 {
     this.fundsContext = fundsContext;
 }