예제 #1
0
 public ContactController(IFormEntryService formEntryService)
 {
     if (formEntryService == null)
     {
         throw new ArgumentNullException(nameof(formEntryService));
     }
     this.formEntryService = formEntryService;
 }
예제 #2
0
        public FormEntryTests()
        {
            var options = new DbContextOptionsBuilder <JobDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString())
                          .Options;

            _context = new JobDbContext(options);

            this._formEntryService = new FormEntryService(_context);
        }
예제 #3
0
        public AdministrationController(IAdminService adminService, IFormEntryService formEntryService)
        {
            if (adminService == null)
            {
                throw new ArgumentNullException(nameof(adminService));
            }

            if (formEntryService == null)
            {
                throw new ArgumentNullException(nameof(formEntryService));
            }
            _adminService     = adminService;
            _formEntryService = formEntryService;
        }