19 lines
462 B
C#
19 lines
462 B
C#
using Core.DomainObjects;
|
|
using Core.Enumerations;
|
|
|
|
namespace WeatherForecast.Models {
|
|
public class CategoryModel {
|
|
public string Slug { get; set; }
|
|
public string Text { get; set; }
|
|
|
|
public CategoryModel(Category category, Locales locale) {
|
|
|
|
var categoryL10n = category.L10n.SingleOrDefault(x => x.Locale == locale);
|
|
if (categoryL10n != null) {
|
|
Slug = categoryL10n.Slug;
|
|
Text = categoryL10n.Text;
|
|
}
|
|
}
|
|
}
|
|
}
|