Juliandyce
Juliandyce
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
je so when i take it online it does it automaticly
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
oh thank u it now at least works. I dont know if it does what I want but 🫨 . I hope I didn´t distract u with my silly question.
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
what now
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
"IServiceScope" has no definition for "GetRequiredService", and the overload of the optimal extension method "ServiceProviderServiceExtensions.GetRequiredService<ApplicationDbContext>(IServiceProvider)" needs a receiver of the typ "System.IServiceProvider".
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=PlanerApp;Trusted_Connection=True;MultipleActiveResultSets=true"
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=PlanerApp;Trusted_Connection=True;MultipleActiveResultSets=true"
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
this is how the program.cs looks like
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(connectionString));
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
builder.Services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = false)
.AddEntityFrameworkStores<ApplicationDbContext>();
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddScoped<AuthenticationStateProvider, RevalidatingIdentityAuthenticationStateProvider<IdentityUser>>();
builder.Services.AddScoped<ProductService>();

var app = builder.Build();


// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseMigrationsEndPoint();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

app.UseHttpsRedirection();

app.UseStaticFiles();

app.UseRouting();

app.UseAuthentication();
app.UseAuthorization();

app.MapControllers();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");

app.Run();
var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(connectionString));
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
builder.Services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = false)
.AddEntityFrameworkStores<ApplicationDbContext>();
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddScoped<AuthenticationStateProvider, RevalidatingIdentityAuthenticationStateProvider<IdentityUser>>();
builder.Services.AddScoped<ProductService>();

var app = builder.Build();


// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseMigrationsEndPoint();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

app.UseHttpsRedirection();

app.UseStaticFiles();

app.UseRouting();

app.UseAuthentication();
app.UseAuthorization();

app.MapControllers();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");

app.Run();
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
how can i put code in this extra blackish window on discord
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
if u know where i have to put it because as u wrote i cant put it in the Program.cs file
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
databanks
28 replies
CC#
Created by Juliandyce on 1/28/2024 in #help
✅ How to automate update-database
i wanna updat sql datenbanken
28 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
thanks
25 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
private List<Classes.Transaction> allTransactions = new List<Classes.Transaction>();
25 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
do i have to write over it using "this class"
25 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
how?
25 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
so can it only know about if it is in the same namespace
25 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
i thought if i use public class it can communicate
25 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
dont think so but i i don use it the error Type or namespace name wasn't found
25 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
i just copied the tutorial but it doesn't work
25 replies
CC#
Created by Juliandyce on 7/14/2023 in #help
❔ I cant find the mistake
oh its german srry
25 replies