Beispiel #1
0
        public async Task Handle(SalaryAccordingDayDomainEvent notification, CancellationToken cancellationToken)
        {
            var NumOfDays = notification.attendance.days;

            var salaryFromEvent = Convert.ToDecimal(NumOfDays) * 150;

            var salary = new Salary.Dmoain.AggregatesModel.EmployeeAggregate.Salary(1, salaryFromEvent);


            salaryRepository.Add(salary);
        }
Beispiel #2
0
 public void Update(Salary.Dmoain.AggregatesModel.EmployeeAggregate.Salary salary)
 {
     _context.Entry(salary).State = EntityState.Modified;
 }
Beispiel #3
0
 public Salary.Dmoain.AggregatesModel.EmployeeAggregate.Salary Add(Salary.Dmoain.AggregatesModel.EmployeeAggregate.Salary employee)
 {
     return(_context.Salary.Add(employee).Entity);
 }