I have a situation that I would like to use the most correct (elegant) way to implement. The scenario is as follows:
I'm building a HelpDesk system where Tickets are stored in a table (and consequently has its own Model) and the Ticket evolutions are stored in another.
The implementation I'm doing is with C # using MVC and Razor
I have already done View
of ticket listing and clicking on it I go to another one that presents details with information of title, content, sector that registered and user.
I would like to bring along with this View
of details the history of evolutions (and even register new evolutions regarding the ticket) and it is precisely in this that I am having difficulties (gather in a single View
information of model
ticket and% of% evolucoes).
Below are the structures assembled for better understanding: MODELS
public class ticket
{
[Key]
public int id_ticket { get; set; }
public int id_setor { get; set; }
public int id_usuario { get; set; }
public string assunto_ticket { get; set; }
public string prioridade_ticket { get; set; }
public string mensagem_ticket { get; set; }
public DateTime data_ticket { get; set; }
public string status_ticket { get; set; }
}
public class Evolucao
{
[Key]
public int id_evolucao { get; set; }
public int id_ticket { get; set; }
public int id_usuario { get; set; }
public string texto_evolucao { get; set; }
public DateTime data_evolucao { get; set; }
}