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?