public async Task <AdditionalDay> AdditionalDaysGetAdditionalDay(Guid additonalDayUID) { AdditionalDay additionalDayToReturn = await DbContext.AdditionalDays .Where(x => x.AdditionaDaysUID == additonalDayUID) .FirstAsync(); return(additionalDayToReturn); }
public async Task AdditonalDaysDelete(Guid additionalDaysUID) { AdditionalDay additionalDay = await DbContext.AdditionalDays .Where(x => x.AdditionaDaysUID == additionalDaysUID).FirstAsync(); additionalDay.AdditionalDaysDeletedOn = DateTime.UtcNow; await this.AdditionalDaysSave(); }
public async Task AdditionalDaysInsert(Guid employeeUID, AdditionalDaysEntity additionalDays) { var employee = await EmployeeRepository.EmployeeGetEmployee(employeeUID); var days = new AdditionalDay() { AdditionaDaysUID = Guid.NewGuid(), AdditionalDaysNumberOfAdditionalDays = additionalDays.AdditionalDaysNumberOfAdditionalDays, AdditionalDaysReason = additionalDays.AdditionalDaysReason, AdditionalDaysCreatedOn = DateTime.UtcNow, EmployeeID = employee.EmployeeID }; await AdditionalDaysRepository.AdditionalDaysInsert(days); }
public void AdditionalDaysUpdate(AdditionalDay additionalDay) { DbContext.Entry(additionalDay).State = EntityState.Modified; }
public async Task AdditionalDaysInsert(AdditionalDay additionalDay) { DbContext.AdditionalDays.Add(additionalDay); await this.AdditionalDaysSave(); }