Пример #1
0
        public IActionResult List()
        {
            List <AttendeeListVM> model = _repo.GetAttendees()
                                          .Select(a => new AttendeeListVM
            {
                Id    = a.ID,
                Name  = a.FirstName + " " + a.LastName,
                Email = a.Email
            }).ToList();

            return(View(model));
        }
Пример #2
0
 public ActionResult GetAttendee(int createdby)
 {
     try
     {
         var l = rep.GetAttendees(createdby);
         return(Ok(JsonConvert.SerializeObject(l)));
     }
     catch (Exception)
     {
         throw;
     }
 }