Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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)
 {
 }
Exemplo n.º 4
0
 /// <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));
 }
Exemplo n.º 5
0
 public DatabaseHelper(ConformitContext context)
 {
     _context     = context;
     dataProvider = new DataAccessProvider(context);
 }
 public CommentService(ConformitContext conformitContext)
 {
     _conformitContext = conformitContext;
 }
Exemplo n.º 7
0
 public EvenementController(ConformitContext context)
 {
     _context     = context;
     dataProvider = new DataAccessProvider(context);
 }
Exemplo n.º 8
0
 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));
 }
Exemplo n.º 11
0
 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);
 }
Exemplo n.º 14
0
 public EventService(ConformitContext conformitContext, ICommentService commentService)
 {
     _conformitContext = conformitContext;
     _commentService   = commentService;
 }
Exemplo n.º 15
0
 public EvenementRepository(ConformitContext conformitContext)
 {
     _conformitContext = conformitContext;
 }
Exemplo n.º 16
0
 public CommentsController(ConformitContext context)
 {
     _context = context;
 }
 public EvenementController(ConformitContext context)
 {
     _context = context;
 }
Exemplo n.º 18
0
 public EventService(
     ConformitContext conformitContext,
     DbSet <Event> dbSet,
     int identity) : base(conformitContext, dbSet, identity)
 {
 }
Exemplo n.º 19
0
 public EventCommentRepository(ConformitContext context, IMapper mapper)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
     _mapper  = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }