public async Task <PhotoShoot> BookingNewShootAsync(PhotoShoot newShoot) { if (await this._photoShootRepository.InsertAsync(newShoot)) { return(newShoot); } return(null); }
public OutputPhotoShoot(PhotoShoot photoShoot, bool withReferences) { Id = photoShoot.ResourceId; OrderId = photoShoot.OrderId; Address = photoShoot.Address; Start = photoShoot.Start; DurationMinutes = (uint)photoShoot.Duration.TotalMinutes; Images = withReferences && photoShoot.Images != null ? photoShoot.Images.Select(image => new OutputPhotoShootImage(image, false)) : null; }
public EquipmentWithdraw ToModel(Employee employee, Equipment equipment, PhotoShoot photoShoot) { return(new EquipmentWithdraw { WithdrawDate = DateTime.UtcNow, ExpectedDevolutionDate = ExpectedDevolutionDate, EffectiveDevolutionDate = EffectiveDevolutionDate, Employee = employee, EmployeeCpf = employee.UserId, Equipment = equipment, EquipmentId = equipment.Id, PhotoShoot = photoShoot, PhotoShootId = photoShoot.Id }); }