/// <summary> /// Constructor for repository /// </summary> /// <param name="context">DB Context</param> public Repository(MoBContext context) { _context = context; _dbSet = context.Set <TEntity>(); }
/// <summary> /// Constructor allows Db Context to be injected /// </summary> /// <param name="context">Mob DB Context</param> public ArtistRepository(MoBContext context) : base(context) { }
/// <summary> /// Allows class to be created using DB Context injected by application /// </summary> /// <param name="context"></param> public UnitOfWork(MoBContext context) { _context = context; }
/// <summary> /// Constructor calls base /// </summary> /// <param name="context"></param> public CollaborationSpaceRepository(MoBContext context) : base(context) { }
/// <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); }