public ActionResult Index() { var estateList = _estateService.GetAll(); var model = Mapper.Map <List <EstateModel> >(estateList); return(View(model)); }
//GET: api/estate public IHttpActionResult Get() { try { return(Ok(_estateService.GetAll())); } catch (Exception ec) { return(BadRequest(ec.Message)); } }