skip to Main Content

Error with database – "Value cannot be null. Arg_ParamName_Name" – Asp.net

I do a project in ASP.NET Core 6.0 and try to connect a database. Program.cs: using ClanSS.Data; using ClanSS.Data.Repository; using Microsoft.AspNetCore.Hosting; using Microsoft.EntityFrameworkCore; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllersWithViews(); builder.Services.AddScoped<IRepository, Repository>(); builder.Services.AddDbContext<AppDbContext>(options => { options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")); }); var app = builder.Build(); if…

VIEW QUESTION
Back To Top
Search