示例#1
0
 public IActionResult OtelList()
 {
     return(View(new OtelListViewModel()
     {
         Oteller = _otelService.GetAll()
     }));
 }
示例#2
0
 public IViewComponentResult Invoke()
 {
     if (RouteData.Values["otel"] != null)
     {
         ViewBag.SelectedOtel = RouteData?.Values["otel"];
     }
     return(View(_otelService.GetAll()));
 }
        public IActionResult Index()
        {
            var otelViewModel = new OtelListViewModel()
            {
                Oteller = _otelService.GetAll()
            };

            return(View(otelViewModel));
        }
示例#4
0
 public IActionResult Oteller()
 {
     try
     {
         var oteller = _otelService.GetAll();
         return(Ok(oteller));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }