public void GetTranslation() { using (CultureHelper.Use("en-us")) { var translation = _multiLingualObjectManager.GetTranslation <MultiLingualBook, MultiLingualBookTranslation>(_book); translation.Name.ShouldBe("C# in Depth"); } }
public MultiLingualBookDto Map(MultiLingualBook source) { var translation = _multiLingualObjectManager.GetTranslation <MultiLingualBook, MultiLingualBookTranslation>(source); return(new MultiLingualBookDto { Price = source.Price, Id = source.Id, Name = translation?.Name }); }