Exemple #1
0
        public List <EventDTO> List(string licencePlate)
        {
            using (CarRentalEntities context = new CarRentalEntities())
            {
                List <Event> events = context.usp_Event_List(licencePlate).ToList();

                if (events.Count.Equals(0))
                {
                    return(null);
                }
                else
                {
                    return(eventMapping.MapToListEventDTO(events));
                }
            }
        }