I am trying to inject some repository to a service and some services to a controller but I am using the DbContext is an assembly that is not the startup projec
I am trying to use [FromQuery] in my web api and I am not sure how to use it. Here's the GetAllBooks() method in the controller: [HttpGet] [Route("api/v1/Sh
I have default Program.cs file from Web Api template in .NET 6.0. I am adding variable "test" so I can use its value in controllers. var builder = WebApplicatio
I have default Program.cs file from Web Api template in .NET 6.0. I am adding variable "test" so I can use its value in controllers. var builder = WebApplicatio
I'm new in backend development and Gettig 415 Unsupported Media Type in multipart API written in .net core. I have attached the postman image for your reference
I am working on a project that requires SAP Solution Manager (SOLMAN) to be integrated with Azure Devops Rest API. Functionality: Whenever a Work Package is cre
I'm trying to call an API which was associated with OAuth 1.0 version. From the postman wen I tried by passing the header param "Authorization" It's value is as
I'm creating a custom result filter that implements IAsyncResultFilter interface. In this filter I need the actual value returned by the Action, but I also need
public async Task<IActionResult> SendOrders() { try { RecurringJob.AddOrUpdate("powerfuljob", () => _lab.SendOrders("
How to do Crud operation on a locally stored json file? For example, I have id, name and roll number. I want to do get, post, put and delete in it using asp.ne
I am using Visual Studio community edition 2022 and trying to update my Models from database in EntityFrameworkCore 6 (I added new tables and modified some). Wh
I'm facing problem while fetching data from an API in ASP.NET Core MVC controller (imdb api). The problem is I cannot deserialize the current JSON object into t
Here's how I upload file my Api action : [HttpPost] public async Task<BaseListResponse<MediaStorageModel>> MediaBrand(IFormFile file, int brandId)
Is it possible to set an auth scope checkbox checked by default on Swashbuckle UI on a asp.net Core 2.0 Web API?? I use the "openid" scope and I'd like to have
I am doing POC using Prometheus in .net core app. I did not found sufficient information on Prometheus website to get started , I have following question if som
Is there a way to specify example requests for swagger? Maybe even multiple ones? The Try it out button shows only generic values like: { "firstName": "s
I'm using ASP.NET Core 5. As below, I'm using System.Text.Json: public IActionResult Index() { var result = GetAllMenuItems(); return Ok(result); } The
Building CI pipeline for .Net core APIs in VSTS. But while building getting the below error. Publishing build artifacts failed with an error: Not found PathtoP
I am trying my hand at .net core web api. I have created a static method for registering my controllers like this: public static class RegistrationExtensions {
I notice that there are a bunch of similar questions out there about this topic. I'm getting this error when calling any of the methods below. Microsoft.A