コード例 #1
0
        public async Task <AdditionalDay> AdditionalDaysGetAdditionalDay(Guid additonalDayUID)
        {
            AdditionalDay additionalDayToReturn = await DbContext.AdditionalDays
                                                  .Where(x => x.AdditionaDaysUID == additonalDayUID)
                                                  .FirstAsync();

            return(additionalDayToReturn);
        }
コード例 #2
0
        public async Task AdditonalDaysDelete(Guid additionalDaysUID)
        {
            AdditionalDay additionalDay = await DbContext.AdditionalDays
                                          .Where(x => x.AdditionaDaysUID == additionalDaysUID).FirstAsync();

            additionalDay.AdditionalDaysDeletedOn = DateTime.UtcNow;

            await this.AdditionalDaysSave();
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public void AdditionalDaysUpdate(AdditionalDay additionalDay)
 {
     DbContext.Entry(additionalDay).State = EntityState.Modified;
 }
コード例 #5
0
 public async Task AdditionalDaysInsert(AdditionalDay additionalDay)
 {
     DbContext.AdditionalDays.Add(additionalDay);
     await this.AdditionalDaysSave();
 }