public SaveEmployeeCommandHandler(IEmployeeService employeeService, ICreateAttributeService createAttributeService) { ArgumentHelper.EnsureNotNull(nameof(employeeService), employeeService); ArgumentHelper.EnsureNotNull(nameof(createAttributeService), createAttributeService); _employeeService = employeeService; _createAttributeService = createAttributeService; }
public SaveEmployeeCommandValidator(IEmployeeService employeeService, IAttributeInfoService attributeInfoService) { ArgumentHelper.EnsureNotNull(nameof(employeeService), employeeService); ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService); _employeeService = employeeService; _attributeInfoService = attributeInfoService; }
public async Task Add(Employee employee) { ArgumentHelper.EnsureNotNull(nameof(employee), employee); employee.LastModified = DateTime.UtcNow; await _db.Employees.AddAsync(employee).ConfigureAwait(false); await _db.SaveChangesAsync().ConfigureAwait(false); }
public EmployeeService(HrSystemDb hrSystemDb, IAccountService accountService, IDocumentService documentService) { ArgumentHelper.EnsureNotNull(nameof(hrSystemDb), hrSystemDb); ArgumentHelper.EnsureNotNull(nameof(accountService), accountService); ArgumentHelper.EnsureNotNull(nameof(documentService), documentService); _db = hrSystemDb; _accountService = accountService; _documentService = documentService; }
public GetEmployeeQueryHandler( IEmployeeService employeeService, IAttributeInfoService attributeInfoService) { ArgumentHelper.EnsureNotNull(nameof(employeeService), employeeService); ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService); _employeeService = employeeService; _attributeInfoService = attributeInfoService; }
protected AttributeBase(Employee employee, AttributeInfo attributeInfo) { ArgumentHelper.EnsureNotNull("employee", employee); ArgumentHelper.EnsureNotNull("attributeInfo", attributeInfo); EmployeeLogin = employee.Login; Employee = employee; AttributeInfoId = attributeInfo.Id; AttributeInfo = attributeInfo; Descriminator = attributeInfo.Type; }
public GetAttributesQueryHandler(IAttributeInfoService attributeInfoService) { ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService); _attributeInfoService = attributeInfoService; }
public SaveAttributeCommandValidator(IAttributeInfoService attributeInfoService) { ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService); _attributeInfoService = attributeInfoService; }
public void EnsureNotNull2() { ArgumentHelper.EnsureNotNull(new object(), nameof(Object)); ArgumentHelper.EnsureNotNull(123, "number"); }
public void EnsureNotNull1() { try { ArgumentHelper.EnsureNotNull(null, null); } catch (ArgumentNullException) { } }
public GetAttributeSavingInfoQueryValidator(IAttributeInfoService attributeInfoService) { ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService); _attributeInfoService = attributeInfoService; }
public AttributeController(IMediator mediator) { ArgumentHelper.EnsureNotNull(nameof(mediator), mediator); _mediator = mediator; }
public AttributeInfoService(HrSystemDb db) { ArgumentHelper.EnsureNotNull(nameof(db), db); _db = db; }