ASP.NET Core Web API .NET 8 2024 - 3. Entity Framework

preview_player
Показать описание
ASP.NET Core Web API .NET 8 2024 - 3. Entity Framework

SQL Server Connection String Template (WINDOWS):

"Data Source={PCNAME}\\SQLEXPRESS;Initial Catalog={DATABASENAME};Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"

Azure Edge Connection String Template (MAC OS ARM):

Рекомендации по теме
Комментарии
Автор

Great course! I don't know if I did something wrong, but a needed to run this command before the migrations int "dotnet tool install --global dotnet-ef --version 8.0.0"

TheJunioGG
Автор

Hey y'all, if you had an issue with the "dotnet ef migrations add init" part
**run this line in the terminal**

*dotnet tool install --global dotnet-ef --version 8.0.0*

I specifically set it for the version he used in the video, but if you want to use a newer or older version, make sure you change that end part. You should be able to do the migrations add init now 😎

lashondamiller
Автор

It is SO encouraging to hear a online tutor like yourself say "PLEASE no errors. PLEASE. Thank you God." :)

ScottMeesey
Автор

I'm a simple man: Teddy posts a video, I open youtube app to give a thumbs up and support his channel

joaogabrielv.m
Автор

learning with you is exciting and non-boring! thanks a lot.

SeethMione
Автор

I have to thank you for all the effort you put into these videos. They are great. Keep em up, bro!

timomartinson
Автор

This is pretty great ... Thanks for making this series man

Suarvae
Автор

Program.cs is the back of the TV. Great analogy. 😄

caseyspaulding
Автор

Make sure to turn off your antivirus if you have one for the dotnet ef migrations add init part of the video. Kept getting a The requested operation cannot be performed on a file with a user-mapped section open error.

zqummfs
Автор

make sure to to put semicolon ( ; ) at the end of the connection string

raulpetcu
Автор

I could not run the command "dotnet ef migrations add init" although I run "dotnet tool install ..." before. It's always error: Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-ef does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

Himakevolution
Автор

base is calling the parent constructor with the matching signature. So calling base(dbContextOptions) will look in the parent class (also called the super class) for a consturctor with the signature DBContext(DbContextOptions options) and call that BEFORE it calls any of your constructor body.

alanthomasgramont
Автор

The connection string somehow confused me. There is {PCNAME} part which I changed but I didn't see the \\SQLEXPRESS which also is part of the data source. Please edit it for noob programmers like me who don't read the code completely😂❤

Rezishon
Автор

Hi Teddy, thank you so much for your video. Is there any ways you can create another one to help Mac User? I am getting a lil confused with Azure Data Studio.

Thanks

kevinpham
Автор

hello brother why my = dotnet ef migrations add init not work pls help me !

nenygaming
Автор

How will install dependency for frontend?

tryinfo
Автор

The question I have is with reading the database data. I do my migrations to my data base smoothly and changed are made when i changed my models. My problem is when trying to execute an entity framework and just getting data from the data already in the DB. It shows that there is no data in the data base when there is.

aprodigykid
Автор

In SQL Server Management Studio, what server name should I write? I have just installed it for the first time and am going step by step in this course. Should I understand how SSMS works before taking this course?

ghaithchikhalchabab
Автор

Hi mr.Smith, hi everyone. I've follow this video but I got stuck when I run the command ' dotnet ef migrations add init ', it printed Build succeed AND the error : "The property 'Stock.Industry' could not be mapped because it is of type 'string', which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'." I certainly write the same syntaxs like you. Can you recommend way to solve the problem ? Thank you so much.

vutungly
Автор

Gr8!, but I had used this command before ef mingration : "dotnet tool install --global dotnet-ef --version 8.0.6"

santkumarvishwakarma