示例#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));
        }
 public ActionResult GetAttendee(int createdby)
 {
     try
     {
         var l = rep.GetAttendees(createdby);
         return(Ok(JsonConvert.SerializeObject(l)));
     }
     catch (Exception)
     {
         throw;
     }
 }