public ActionResult Index() { var service = new ProviderService(); var model = service.GetProviders(); return(View(model)); }
public IActionResult GetProviders() { var descriptors = ProviderService.GetProviders() .Select(kv => MetadataService.GetMetadata(kv.Value)) .ToList(); return(Ok(descriptors)); }
static void GetProviders(ProviderService serv) { ProviderService service = serv; foreach (var i in service.GetProviders()) { Console.WriteLine("ID - {0} ; Name - {1} ; Adress - {2} .", i.Id, i.Name, i.Adress); } }
public void PresenterProviders() { ProviderListResponse providerList = providerService.GetProviders(); if (providerList.Success) { _view.SuccessProvider(providerList.ListProvider); } else { _view.ErrorProvider(string.Format("{0}", providerList.Exception.Message)); } }
static SpyglassMongoContext() { var providers = ProviderService.GetProviders(); foreach (var provider in providers) { var map = new BsonClassMap(provider.Value); map.AutoMap(); map.SetDiscriminator(provider.Value.Name); if (!BsonClassMap.IsClassMapRegistered(provider.Value)) { BsonClassMap.RegisterClassMap(map); } } }