Example #1
0
 public ActionResult ViewAdmin(int id)
 {
     ViewBag.IdForm = id;
     using (var ctx = new GoogleFormDbContext())
         using (var cmd = ctx.Database.Connection.CreateCommand())
         {
             ctx.Database.Connection.Open();
             cmd.CommandText = "EXEC [dbo].[DynamicPivot] " + id;
             using (var reader = cmd.ExecuteReader())
             {
                 var model = this.Read(reader).ToList();
                 return(View(model));
             }
         }
 }