public ActionResult Index()
{
using (var context = new Model1())
{
// Query for all blogs with names starting with B
var blogs = from b in context.Users
where b.Username.StartsWith("P")
select b;
var result = from user in context.Users
join ticket in context.Tickets
on user.Id equals ticket.UserId
select new { user.Id, user.Username, ticket.Name };
var ss = result.ToList();
}
Model1 usercontainer = new Model1();
var data = usercontainer.Users;
return View(data);
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.