public override async Task <Roulette> FillEntityFromModelDTO(Roulette entity, IModelDTO dto)
        {
            RouletteCreateDTO modelDto = (RouletteCreateDTO)dto;

            entity.Description = modelDto.Description;
            entity.State       = await GetAndValidateRouletteProperties <RouletteState>(modelDto.State);

            entity.Type = await GetAndValidateRouletteProperties <RouletteType>(modelDto.Type);

            return(entity);
        }
Esempio n. 2
0
        public override async Task <RouletteType> FillEntityFromModelDTO(RouletteType entity, IModelDTO modelDTO)
        {
            entity.Type = ((RouletteTypeCreateDTO)modelDTO).Type;

            return(await Task.Run(() => entity));
        }