Ejemplo n.º 1
0
        /// <inheritdoc />
        public async Task <long> CreateWorkshop(Workshop workshop)
        {
            var infraWorkshop = workshop.Adapt <InfrastructureWorkshop>();
            await _database.AddAsync(infraWorkshop);

            return(infraWorkshop.Id);
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public Task EditWorkshop(Workshop workshop)
        {
            var infraWorkshop = workshop.Adapt <InfrastructureWorkshop>();

            return(_database.EditAsync(infraWorkshop, default, nameof(InfrastructureWorkshop.Id),
Ejemplo n.º 3
0
        /// <inheritdoc/>
        public GetWorkshopQuery.Workshop GetWorkshop(GetWorkshopQuery query)
        {
            Workshop workshop = _repository.GetWorkshop(query.Id);

            return(workshop == null ? null : workshop.Adapt <GetWorkshopQuery.Workshop>());
        }