TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sibusiso Madlopha
NA
140
883
ERROR Value cannot be null. Parameter name: source.
Oct 20 2018 11:57 AM
[HttpPost]
public ActionResult Search(DemoSearchModel model)
{
switch(model.SearchType)
{ case SearchTypeEnum.City:
var cities = new ESBFeedsService().QueryCityList().Data.Select(d=>d.ToObjectMap<CityDto>(false)).ToList();
var modelCities = new DisplayPropertyModels().Build(cities.ToList(),model.SearchType);
return View(modelCities);
case SearchTypeEnum.Property:
// var service = new ESBFeedsService();
var properties =new ESBFeedsService().QueryPropertyList().Data.Select(d => d.ToObjectMap<PropertyDto>(false)).ToList();
var modelProperties = new DisplayPropertyModels().Build(properties.ToList(), model.SearchType);
return View(modelProperties);
case SearchTypeEnum.Company:
var companies = new ESBFeedsService().QueryCompanyList().Data.Select(d => d.ToObjectMap<CompanyDto>(false)).ToList();
var modelC = new DisplayPropertyModels().Build(companies, model.SearchType);
return View(modelC);
case SearchTypeEnum.State:
var states = new ESBFeedsService().QueryStateList().Data.Select(d => d.ToObjectMap<StateDto>(false)).ToList();
var modelPt = new DisplayPropertyModels().Build(states, model.SearchType);
return View(modelPt);
}
return View();
}
Reply
Answers (
2
)
how can send value from api controller to normal controller
Is there any way I could use the Marble widget in C#