コード例 #1
0
        public ActionResult Index()
        {
            var estateList = _estateService.GetAll();
            var model      = Mapper.Map <List <EstateModel> >(estateList);

            return(View(model));
        }
コード例 #2
0
ファイル: EstateController.cs プロジェクト: Walex996/Toeb
 //GET: api/estate
 public IHttpActionResult Get()
 {
     try
     {
         return(Ok(_estateService.GetAll()));
     }
     catch (Exception ec)
     {
         return(BadRequest(ec.Message));
     }
 }