Example #1
0
        public ActionResult IndexPartial(Guid parentVendor)
        {
            using (var context = dataContextFactory.CreateByUser())
            {
                var privateKeyQuery = (from x in context.PrivateKeys where x.VendorId == parentVendor orderby x.DisplayName select x);
                var vendorQuery     = (from v in context.Vendors where v.ObjectId == parentVendor select v);

                PrivateKeyIndexViewModel viewModel = new PrivateKeyIndexViewModel(privateKeyQuery.ToList(), vendorQuery.FirstOrDefault());

                return(PartialView(viewModel));
            }
        }
Example #2
0
        public ActionResult IndexPartial(Guid parentVendor)
        {
            using (var context = dataContextFactory.CreateByUser())
            {
                var privateKeyQuery = (from x in context.PrivateKeys where x.VendorId == parentVendor orderby x.DisplayName select x);
                var vendorQuery = (from v in context.Vendors where v.ObjectId == parentVendor select v);

                PrivateKeyIndexViewModel viewModel = new PrivateKeyIndexViewModel(privateKeyQuery.ToList(), vendorQuery.FirstOrDefault());

                return PartialView(viewModel);
            }
        }