Witam

Napisałem sobie procedure w której łącze dwie tabele ( relacja jeden do wiele - lecz to nie istotne ):

public class Clients
    {
        public int ID_C { get; set; }
        public string Corporation { get; set; }
        public string Name { get; set; }
        public string Surname { get; set; }
        public string Note { get; set; }
        public DateTime Date { get; set; }
    }

public class E_mail
    {
        public int ID_E { get; set; }
        public int ID_C { get; set; }
        public string E__mail { get; set; }
        public string Note { get; set; }
    }

Kiedy chcę pobrać klienta i przesłac do widoku to nie ma problemu:

 public void LoadView()
        {
            var con = Database.Open();
            ListClients = con.ShowAllClients();
            _clientsView.AddClientsToGrid(ListClients);
        }

ale gdy chce przesłać do widoku wynik procedury która łączy klienta z e-mail-em i zawiera odpowiednie atrybuty to :

  1. Mam tworzyć nową klasę dedydkowaną dla widoku?
  2. Mapować ( nie mam pojęcia jak tu zrobić. Zapoznałem się z AutoMapperem ) ale tu doświadczenia brak.

Pozdrawiam.