示例#1
0
        public TicketType Create(TicketTypeCreateDto dto)
        {
            var entity = new TicketType
            {
                Name  = dto.Name,
                Price = dto.Price
            };

            return(repository.Add(entity));
        }
        public dynamic Add(TicketTypeDto item)
        {
            TicketType ticketType = MapperHelper <TicketType, TicketTypeDto> .ConvertToModel(item);

            var output = _repository.Add(ticketType);

            output["Output"] = MapperHelper <TicketType, TicketTypeDto> .ConvertToDto(output["Output"]);

            return(output);
        }
示例#3
0
        public async Task <TicketTypeDTO> Add(TicketTypeDTO type)
        {
            var newType = await _dataProvider.Add(type);

            return(newType);
        }