Skip to main content

Questions tagged [asp.net]

ASP.NET is a web application framework developed by Microsoft to allow programmers to build dynamic web sites and web applications.

2 votes
0 answers
73 views

Generic UnitOfWork implementation with Dapper. (Updated)

Here's my attempt to implement the suggested corrections I received in my previous post. Since System.Data.IDbTransaction doesn't support ...
FAMO4S's user avatar
  • 33
1 vote
1 answer
92 views

Generic UnitOfWork implementation (Dapper)

I'm creating a three layered Visual Studio template solution that I'll be using as a starting point for all ASP.NET projects. The layers are Presentation, Application and Infrastructure. ...
FAMO4S's user avatar
  • 33
-2 votes
3 answers
253 views

Is returning null is always a code smell? When it a code smell or when maybe not?

I have a simple C# .NET core action method that receives data from a service it calls. The service returns null if no record found for the supplied parameter or ...
riki's user avatar
  • 115
3 votes
1 answer
115 views

Parsing JSON file directory then using file data as request bodies

Been on SO for a very long time, new to this site. I am creating console app which tests API endpoint performance using json files from the specified directory as request bodies. Request json files ...
Victor's user avatar
  • 133
2 votes
1 answer
119 views

Seeking Suggestions for Improving My Program.cs File for a .NET Project

I use this code as reference for when I start working on a new project whether that be for personal or for work. It's worked fine so far, but I'm wondering if anyone can read it and provide any ...
sammy medawar's user avatar
4 votes
1 answer
169 views

Abstraction with Ef core (repository)

I am new to entity framework, and I've been working on a project lately that I used clean architecture in and found myself in a bit of hassle. should I introduce further abstraction to the already ...
Lemon juice's user avatar
-1 votes
0 answers
78 views

Custom ASP.NET Core CookieAuthenticationHandler

I wrote a CustomCookieAuthenticationHandler because I don't like the way CookieAuthenticationHandler.HandleForbiddenAsync() ...
iKingNinja's user avatar
5 votes
3 answers
423 views

Implementing Generic Enumeration Classes in Domain Layer

I'm developing an ASP.NET Core application using .NET 8, following the Onion Architecture. In our domain model, we use Enumeration classes instead of traditional ...
James Black's user avatar
1 vote
1 answer
64 views

Map domain entities using AutoMapper.ProjectTo and clean architecture approach

We have a mid-size project. Two projects in solution, API and Domain. Domain contains services with business logic. We don't use repositories. Just call DbContext directly from services (that's fine ...
user1614543's user avatar
3 votes
1 answer
126 views

How to avoid null Values in a .NET 6+ ASP.NET project [closed]

I'm currently exploring multiple options to get rid of null values in my .net web api applications. Let's say, that we have the following Project: ...
szuuuken's user avatar
  • 131
3 votes
2 answers
99 views

Validating a web crawlers page visits with a decorator

I am writing a crawler that is going to end up in production and I was trying to come up with a way to validate its page visits. It scrapes asp.net pages so each scraping process involves a few ...
Gustavo Costa's user avatar
2 votes
1 answer
78 views

Convention based OpenApi schema generation for dotnet and NSwag

So I am getting tired from adding the same [ProducesResponseType] attribute on my WebAPI controller methods over and over, and I thought there must be an easier, ...
Marc Wittke's user avatar
1 vote
1 answer
84 views

Insert huge data from csv file in .Net framework 4.7.2

I need to insert about 500k - 1 million data lines from a CSV file. The time of getting the reports list and insert to database by using SqlBulkCopy is very good (...
HaNgocHieu's user avatar
0 votes
1 answer
128 views

logging in using cookie authentication/authorization in asp.net C#

How safe is Cookie based Authentication/Authorization in ASP.NET C#? Take a look at the example below, don't worry about password hashing, All this code does is that it takes a username and a password ...
Newbie's user avatar
  • 23
2 votes
1 answer
297 views

Building ASP.Net control from JSON Data

I am working project where I need to build ASP.net control base on JSON data. I am using this method below to get all the data into class. I as using FirstOrDefault ...
Jefferson's user avatar
  • 423

15 30 50 per page
1
2 3 4 5
31