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); }
public override async Task <RouletteType> FillEntityFromModelDTO(RouletteType entity, IModelDTO modelDTO) { entity.Type = ((RouletteTypeCreateDTO)modelDTO).Type; return(await Task.Run(() => entity)); }