skip to Main Content

asp.net 6 EF using MySql Database not working

I am trying to connect my Web API build in asp.net 6 with MySql and I am having a lot of trouble My Service looks like this builder.Services.AddDbContext<TicketApiContext>(options => options.UseMySQL("CONNECTION_STRING")); and my Database Context like this. using Microsoft.EntityFrameworkCore; namespace VelocityNetAPI.Data…

VIEW QUESTION

How import WebApplicationBuilder in a Class Library? – Asp.net

I want to create an extension method for WebApplicationBuilder: public static void AddData(this WebApplicationBuilder builder) { var connectionString = builder.Configuration.GetConnectionString("DefaultConnection"); builder.Services.AddDbContext<ApplicationDbContext>(option => { option.UseSqlite(connectionString); }); } this method works in a project that use: <Project Sdk="Microsoft.NET.Sdk.Web">, but if I put…

VIEW QUESTION

URI to Bitmap C# ASP.NET

I am capturing a URI in ASP.NET MVC with webcam.js. I would like to turn this URI to to bitmap in C#. Below is my current code for attempting to parse the URI into a bitmap, but it, but it…

VIEW QUESTION
Back To Top
Search