public BaseService(ConformitContext conformitContext, DbSet <TModel> dbSet, TId identity) { PropertyInfos = typeof(TModel).UnderlyingSystemType.GetProperties().Where(info => !info.Name.Equals("Id") && info.CanRead && info.CanWrite); ConformitContext = conformitContext; Identity = identity; DbSet = dbSet; }
protected void Setup() { var connection = new SqliteConnection("DataSource=:memory:"); connection.Open(); var builder = new DbContextOptionsBuilder <ConformitContext>() .UseSqlite(connection); var options = builder.Options; ConformitContext = new ConformitContext(options, new Env()); ConformitContext?.Database.EnsureCreated(); }
public StakeholderService( ConformitContext conformitContext, DbSet <Stakeholder> dbSet, int identity) : base(conformitContext, dbSet, identity) { }
/// <summary> /// Initializes a new instance of the <see cref="EventService"/> class. /// </summary> /// <param name="dbContext">The database context.</param> /// <param name="configuration">The configuration.</param> /// <param name="logger">The logger.</param> /// <exception cref="ArgumentNullException"> /// dbContext /// or /// configuration /// or /// logger /// </exception> public EventService(ConformitContext dbContext, IConfiguration configuration, ILogger logger) { _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext));; _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public DatabaseHelper(ConformitContext context) { _context = context; dataProvider = new DataAccessProvider(context); }
public CommentService(ConformitContext conformitContext) { _conformitContext = conformitContext; }
public EvenementController(ConformitContext context) { _context = context; dataProvider = new DataAccessProvider(context); }
public EventsController(ConformitContext context, IUriService uriService) { _context = context; _uriService = uriService; }
/// <summary> /// Initializes a new instance of the <see cref="EventService" /> class. /// </summary> /// <param name="dbContext">The database context.</param> /// <param name="logger">The logger.</param> /// <exception cref="ArgumentNullException">dbContext /// or /// configuration /// or /// logger</exception> public CommentService(ConformitContext dbContext, ILogger logger) { _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext));; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public EvenementController(ConformitContext context) { //_context = context; _context = context ?? throw new ArgumentNullException(nameof(context)); }
public DataAccessProvider(ConformitContext context) { _context = context; }
public CommentaireController(ConformitContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); }
public CommentaireController(ConformitContext context) { _context = context; dataProvider = new DataAccessProvider(context); }
public EventService(ConformitContext conformitContext, ICommentService commentService) { _conformitContext = conformitContext; _commentService = commentService; }
public EvenementRepository(ConformitContext conformitContext) { _conformitContext = conformitContext; }
public CommentsController(ConformitContext context) { _context = context; }
public EvenementController(ConformitContext context) { _context = context; }
public EventService( ConformitContext conformitContext, DbSet <Event> dbSet, int identity) : base(conformitContext, dbSet, identity) { }
public EventCommentRepository(ConformitContext context, IMapper mapper) { _context = context ?? throw new ArgumentNullException(nameof(context)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }