Hallo everybody,
I use a specific data model (classes) that I use to fill with Json-Data (Deserialize over Newtonsoft).
At the moment I define this classes in the template with
@function{
public class Product
{
public string ProductID { get; set; }
public string ProductName { get; set; }
public string ProductCategory { get; set; }
}
}
I would like to put this model somewhere in the project. So I created a folder “Models” in the root folder of Umbraco.
I tried to use that model by putting the folloing using-directive in the template.
@using umbraco.Models;
This does not seem to work. What do I have to do?
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/105587-data-model-in-umbraco