/// <inheritdoc /> public async Task <long> CreateWorkshop(Workshop workshop) { var infraWorkshop = workshop.Adapt <InfrastructureWorkshop>(); await _database.AddAsync(infraWorkshop); return(infraWorkshop.Id); }
/// <inheritdoc /> public Task EditWorkshop(Workshop workshop) { var infraWorkshop = workshop.Adapt <InfrastructureWorkshop>(); return(_database.EditAsync(infraWorkshop, default, nameof(InfrastructureWorkshop.Id),
/// <inheritdoc/> public GetWorkshopQuery.Workshop GetWorkshop(GetWorkshopQuery query) { Workshop workshop = _repository.GetWorkshop(query.Id); return(workshop == null ? null : workshop.Adapt <GetWorkshopQuery.Workshop>()); }