Defining an API caller class with ASP.NET Core

I’m developing an App that makes calls to the Prestashop API. I’ve worked with APIs before but not in ASP.NET Core. On the client side in Java (retrofit) we used to have an interface where we defined our URL calls and function names like so: public interface TodoApi { @POST(“/owners/login”) Call<String> loginP(@Body UserLogin login); @POST(“/workers/login”)…

ASP.NET MVC DropDownlist event to partial view

I got dropdownlist like @Html.DropDownList(“ProjectsList”) and a link in near it @Html.ActionLink(“Change Project”, “ChangeProject”, new { code = param }, new { id = “myLink2” }) and also a dropdown list for db names which is accordingly change to previous list @Html.DropDownList(“Databaselist”) What I want is when I click the “Change Project” link it will…

ASP.NET MVC Fill dropdown from Table

I got a column name like CODE from Projects_Table table. How can I select all this column values with linq to dropdown. I tried this: public ToolEntities db = new ToolEntities(); // GET: Projects_Table public ActionResult Index() { ViewBag.list = new SelectList(db.Projects_Table, “CODE”, “CODE”); return View(db.Projects_Table.ToList()); } I want to fill show this Viewbag.list like…

Is it possible to use ASP.NET Core 2.x MVC on .NET Framework 4.6.1 console application

I’m attempting to port an ASP.NET MVC 4.x application over to ASP.NET Core 2.2. WebApi works great, but I’m stuck with porting over the MVC views. I’ve created a full “minimally viable” repro to show what I mean. The Program.cs looks like this: using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace TestApp { public class Program…