Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public JsonResult GetMessages()
- {
- using(FleetContext ctx = new FleetContext())
- {
- IEnumerable<string> messages = ctx.Insurers.AsQueryable().Cast<Insurer>().Select(x => x.Name).ToList();
- var dataOutput = Json(messages, JsonRequestBehavior.AllowGet);
- return dataOutput;
- }
- }
Add Comment
Please, Sign In to add comment