public static DeckDto ToDeckDto(this DeckModel model)
        {
            var dto = model.ConvertTo <DeckDto>();

            dto.Cards = model.Cards.ConvertAll(x => x.ToCardDto());
            return(dto);
        }
        public static DeckTable ToDeckTable(this DeckModel model, Guid?applicationId = null, Guid?deckCategoryId = null)
        {
            var row = model.ConvertTo <DeckTable>();

            row.ApplicationId  = model.Application?.ApplicationId ?? applicationId.GetValueOrDefault();
            row.DeckCategoryId = model.DeckCategory?.DeckCategoryId ?? deckCategoryId.GetValueOrDefault();
            return(row);
        }