Пример #1
0
 private async Task LeaveFormTypeReset()
 {
     for (int i = 0; i < 3; i++)
     {
         LeaveFormType fooLeaveFormType = new LeaveFormType()
         {
             Name = $"LeaveFormType{i}",
         };
         lobDatabaseContext.LeaveFormTypes.Add(fooLeaveFormType);
     }
     await lobDatabaseContext.SaveChangesAsync();
 }
Пример #2
0
        public static LeaveForm ToLeaveForm(this LeaveFormRequestDTO leaveFormRequestDTO, LobUser lobUser, LeaveFormType leaveFormType)
        {
            LeaveForm fooLeaveForm = new LeaveForm()
            {
                BeginTime     = leaveFormRequestDTO.BeginTime,
                EndTime       = leaveFormRequestDTO.EndTime,
                Description   = leaveFormRequestDTO.Description,
                TotalHours    = leaveFormRequestDTO.TotalHours,
                User          = lobUser,
                LeaveFormType = leaveFormType,
            };

            return(fooLeaveForm);
        }