Questions tagged [asp.net-core-webapi]

Questions about ASP.NET Core web APIs and web apps that are not dependent on MVC Views or Razor Pages.

Filter by
Sorted by
Tagged with
3
votes
2answers
61 views

pagination in entity framework and refactoring

I have an api end point which returns the paginated result, the corresponding code for that is as below: ...
0
votes
1answer
40 views

ASP.Net Core API JsonPatchDocument

Hi I am creating a website for my chiropractor and I am creating the API for data access. I am creating a HttpPatch Method and want to know if this is the right approach so would be grateful if you ...
3
votes
0answers
118 views

ASP.NET Core 3.1 Web API + Pure DI

I was playing around with ASP.NET Core 3.1 and tried to implement Dependency Injection flavor called Pure DI, i.e. without dependency container (even the built in one) to instantiate Controllers. You ...
3
votes
0answers
86 views

ASP .NET Core DI: Dependency on single implementation of multiple registrations of service type

Problem I have a DI scenario where I have multiple classes that implement a common interface (IModelService). I'm using a generic framework class (...
2
votes
1answer
50 views

Delete redundant files in folder and db

I want to delete files from folder, which are not stored in DB, and DB records, which no more linked to files. My code: ...
1
vote
1answer
45 views

Optimizing calls for reauthentication by caching tokens and cookies

I am currently developing a REST service in ASP.NET Core 2.2 that acts as a wrapper upon a REST API provided by a reporting solution. The reporting systems REST API authenticates the user based on a ...
1
vote
1answer
66 views

A ValueService is used to share data among objects

I have C# code that makes some calculations for physical models. I have this project class: ...
0
votes
0answers
660 views

Upsert with .Net Core Web API

I am using .NET Core 2.2, EF Core and C#. I have created a web API project. I was requested to do an Upsert (insert or update). The entities structure is: Movie User Rating: this is used to give a ...
3
votes
2answers
198 views

Streaming modified lines of a file from a Controller

I am writing a piece of software that aims at streaming the modified lines of an external file located at given uri (and retrieved as a QueryString parameter). I am trying to minimize the impact of ...
0
votes
1answer
778 views

Asynchronously fetching data from the database

The following C# code is written to fetch the Categories data from SQL Server Database using Asynchronous Task for HttpGet. The Dapper library is used as ORM. I ...