public ActionResult ShowAllPage() { List <ClientModel> list; using (var database = new LogicLL()) list = mapper.Map <List <ClientModel> >(database.GetAllClients()); return(View(list)); }
public ActionResult CreatePageName() { List <ClientModel> allClients; using (var database = new LogicLL()) allClients = mapper.Map <List <ClientModel> >(database.GetAllClients()); ViewData["AllClients"] = allClients; return(View(allClients)); }
public ActionResult EditPage(Guid id) { ClientModel client; using (var database = new LogicLL()) client = (mapper.Map <List <ClientModel> >(database.GetAllClients())) .Where(x => x.Id == id) .First(); return(View(client)); }
public ActionResult SearchPage(string searchString) { if (String.IsNullOrWhiteSpace(searchString)) { return(RedirectToAction("SearchPage")); } List <ClientModel> output; using (var database = new LogicLL()) output = mapper.Map <List <ClientModel> >(database.GetAllClients()); output.Where(x => JsonConvert.SerializeObject(x).Contains(searchString)); return(View(output)); }