Base solution for your next web application

Activities of "geaton"

Hi, I hope this message finds you well. I am experiencing difficulties in viewing and downloading the invoices. Could you please assist me? I specifically require access to the latest invoice. Thank you in advance for your help. Best regards, Facundo.

Hi,

I was following the tutorial about MLE and got stucked with the CRUD/Creation part

<br>

public class ProductDto
{
    public decimal Price { get; set; }

    public ICollection<ProductTranslationDto> Translations { get; set; }
}

//After defining such a Dto class, we can use it in our application service to create a Multi-Lingual entity.

public class ProductAppService : ApplicationService, IProductAppService
{
    private readonly IRepository<Product> _productRepository;

    public ProductAppService(IRepository<Product> productRepository)
    {
        _productRepository = productRepository;
    }

    public async Task CreateProduct(ProductDto input)
    {
        var product = ObjectMapper.Map<Product>(input);
        await _productRepository.InsertAsync(product);
    }
}```

If the CreateProduct() AppService method receives a ProductDto with all Translations of type ProductTranslationDto. What are the properties of that Dto? How do I specifify each language of every translated "Name"?

Because the ProductTranslationDto defined in the example is this. But there is no property to define the "Language" of that translation


[AutoMap(typeof(ProductTranslation))]
public class ProductTranslationDto
{
    public string Name { get; set; }
}

What am I missing?


Thanks in advanced for your help
Showing 1 to 2 of 2 entries