示例#1
0
 /// <summary>
 /// Constructor for repository
 /// </summary>
 /// <param name="context">DB Context</param>
 public Repository(MoBContext context)
 {
     _context = context;
     _dbSet   = context.Set <TEntity>();
 }
示例#2
0
 /// <summary>
 /// Constructor allows Db Context to be injected
 /// </summary>
 /// <param name="context">Mob DB Context</param>
 public ArtistRepository(MoBContext context) : base(context)
 {
 }
示例#3
0
 /// <summary>
 /// Allows class to be created using DB Context injected by application
 /// </summary>
 /// <param name="context"></param>
 public UnitOfWork(MoBContext context)
 {
     _context = context;
 }
示例#4
0
 /// <summary>
 /// Constructor calls base
 /// </summary>
 /// <param name="context"></param>
 public CollaborationSpaceRepository(MoBContext context) : base(context)
 {
 }
示例#5
0
 /// <summary>
 /// Allows Class to be created using supplied connection string
 /// </summary>
 /// <param name="connectionString">The connection string used to connect to the database.</param>
 public UnitOfWork(string connectionString)
 {
     _context = new MoBContext(connectionString);
 }