You are the best!!!!!. Simply I love your way of explaining. I have an interview and I have just learned the required basics of c#, .Net MVC, and Entity framework in just one day and you saved me. Thanks so so much.
@stephenwall90366 жыл бұрын
Finally! A decent presentation on entity framework. Thank you.
@valentindemchuk12977 жыл бұрын
Thanks Mosh! Your course is the best I've found in a week of searches on the Internet! A good and clear diction, an accessible explanation. Thanks a lot!
@divsyntax97205 жыл бұрын
Thanks!! Actually I was a bit hesitant to use entity cause I like using MSSQL, but now I'm like....."WOW! This is what I've been missing!" So easy! :) Thanks!!
@nahiandev7 жыл бұрын
SIr, You are more tham amazing ! Recently I had your C# basics course on Udemy. To be honest , I learnt a lot from your course that I wasn't taught in my uni. Thanks for being awesome.
@shortsgirl53454 жыл бұрын
xinchao
@moritzschmidt85287 жыл бұрын
Excellent tutorial! I just had to migrate my ASP.ET-Core Project to a normal ASP.NET-Prject and had problems because I was using EF-Core. With this tutorial I managed it to migrate the DataBase within 15 minutes without any probelms. Great work!
@artokilponen69897 жыл бұрын
I have been wanting to see _recent_ EF video tutorial for a long time. Even if this video wouldn't cover a lot of EF, as long as it states the starting point i.e. how to apply methods of old versions to EF, that is enough for me. I like a lot of the editing of video. No-one is actually interested in you writing the code. You can tell where and what to write, but the actual typing is pointless to see. Good work with that! One thing you could have in the video is pointing out typical pitfalls like "pay attention that you...". I had three of these (mostly because I didn't pay enough attention): 1) Adding "using System.Data.Entity;" there in code first section. 2) Typing "public class BlogDBDontext : DbContext" Gave me no errors, the database just didn't appear. 3) "System.Data.Entity.Infrastructure.DbUpdateException occurred HResult=0x80131501 Message=Unable to update the EntitySet 'Posts' because it has a DefiningQuery and no element exists in the element to support the current operation. Source=EntityFramework StackTrace: at System.Data.Entity.Internal.InternalContext.SaveChanges() at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() at System.Data.Entity.DbContext.SaveChanges() at EF_DatabaseFirstDemo.Program.Main(String[] args) in ...EF_DatabaseFirstDemo\Program.cs:line 22 Inner Exception 1: UpdateException: Unable to update the EntitySet 'Posts' because it has a DefiningQuery and no element exists in the element to support the current operation. " which was caused by not having a primary key (your database sample has it, I had just missed it). I needed to edit and run the SQL-file to add the missed primary key. And remove and re-create the edmx. Question: As I also had my "Generate Change Script" disabled, what are the basic steps you do if you forget to add the primary key on table creation process? Is it what I wrote above, or is there a simpler way to accomplish the same? And a couple of questions: 1) At 17:09 you have this jumping to App.config. I know how to get there manually, but is the method you use a part of Resharper (noticed that in your menus) and how do you launch that window? 2) In order to get a connection string to your database, is the best way to copy-paste it from the database first example app.config or do you have some other method for that besides "just type it out from the top of your head"? But in overall a great video! You have clear voice and there was enough but not too much pictures for my taste.
@yrusTube7 жыл бұрын
As always top notch content. Can you please make a video on Unit testing, I am sure it be helpful to all your subscribers.
@yrusTube7 жыл бұрын
Thanks Mosh. Will be looking forward to it :)
@myaccount090119756 жыл бұрын
Excellent presentation, I have become a great fan of your sessions on KZbin.
@shortsgirl53454 жыл бұрын
ccc
@danielnewman67316 жыл бұрын
5:50 With DB first you should create the database using a Database Project in Visual Studio. You can also reverse engineer a database without the EF designer or any edmx files. There are tools you can use to reverse engineer a database to EF, and you can the model generation logic too, using t4 templates and such. For example you want your EF Models to inherit an IEntity. Also, you should treat it as designer generated code, so you can always reverse engineer from database. You should never modify the generated Models directly, if you need to make changes do so through metadata/partial classes.
@shortsgirl53454 жыл бұрын
aa
@gw43034 жыл бұрын
I bought your course of Entity Framework on Udemy. I believe is well spent money :) thanks for the tutorials!
@TahirAlviPakistan7 жыл бұрын
Mosh, well done. You simply rocks. Your presentation, conciseness ans grip on the topic is flawless. Thanks.
@belghoulbilal8794 Жыл бұрын
Hi, sir mosh i'm very greatefull for your courses they are best, please if you can explain us the asp donner identity and how we can custumize and intigrated with real wolrd project,
@Naq946 жыл бұрын
Very nice, illustrative and perfect. Thank you.
@Diyar_Bakir7 жыл бұрын
Thanks Mosh ... I watched full course of C#, probably I'm ganna watch this one. then return to continue asp.net mvc course because I'm new to .Net family and I migrate my programming life from PHP to asp.net and I'm very happy when I see Microsoft going to change asp.net to open source.. please we need tutorial about deploying asp.net project especially on Linux sever even doing on azure not bad.. I hope you have fantastic life and make more tutorials.... for your info: Hamadan is a place in IRAN if I'm not wrong :)
@GaleAnders6 жыл бұрын
This is just so much fun! Afraid I simply have spend the rest of the day doing the full course.
@GaleAnders6 жыл бұрын
What do you mean by pain, man? I've been writing code in all kindes of environments for almost 20 year now. This is the most fun I've had since we dragged the lake looking for my mother in law! BTW I used to teach my self for some years, and your courses are reeeeeally good, man. I've been around the block a few times, and have seen a bit of this and that along the way. Give your self a pat on the back!
@dawidsoko30183 жыл бұрын
We need ytbers like you! Thanks a lot
@zybute4 жыл бұрын
You put learning programming to the next level! Thank You for sharing your knowledge and inspiring to learn more in understandable way!
@shortsgirl53454 жыл бұрын
aa
@richardvyse56114 жыл бұрын
Brilliant, I will be buying this course on Udemy.
@Karenitooo7 жыл бұрын
wow you are a mentor for us :D
@shortsgirl53454 жыл бұрын
aa
@xVidarx186 жыл бұрын
At 15:56 what function do u use to navigate back to the programm? Is it from resharper?
@MohanPatil_Software_Engineer3 жыл бұрын
Nice explanation.. full understanding in one go..
@nazgulresebo7 жыл бұрын
My favorite option is code first with data base ;D
@Felixstoll7 жыл бұрын
thanks Mosh, I am going for the course through pluralsight, it is definitely worth it.
@responsibleparty7 жыл бұрын
Always declare you database context in a *using* block, to ensure it is cleaned up in a timely manner. This should be emphasized even when you are just running a demo to illustrate workflow because it is so important.
@suprajainamadugu70835 жыл бұрын
Hi, Am not able to get ADO.net Entity Data Model template in VS2017 none of the internet solutions helping me could you please suggest how i can resolve
@shortsgirl53454 жыл бұрын
ccc
@jaimerojas65786 жыл бұрын
Amazing I loved the way you explain the topics, I already bought your course in Udemy! Thanks for making it!
@shortsgirl53454 жыл бұрын
xinchao
@OuterOrange3 жыл бұрын
I love your video so far! I do have a question. How do you open app config? It seems to be something I'm struggling in getting to work/find. Thank you!
@ShayanFiroozi14 жыл бұрын
Bravo Moshfegh !
@sasca8545 жыл бұрын
Just a heads up to everyone: Entity Framework does *not* work with Azure data warehouses.
@madezra644 жыл бұрын
What does this mean? Does this mean my Azure SQL Server won't work with Entity?
@shortsgirl53454 жыл бұрын
xinchao
@bobkerman24194 жыл бұрын
@@shortsgirl5345 biến
@GivanniDrogo2 жыл бұрын
Hi Mash, thank you for the great contents. I'm designing a java application using Spring. Based on your past experience, what are the relatively not too complex design pattern that enables developing a n-tier application composed by: 1. front-end application (Client HOST - Browser) - Programming language: Angular(?-TBD) 2. web server application (Web server HOST) - Programming language: Java 3. back-end server application (back-end server HOST) - Programming language: Java 4. relational database server application (RDBMS server HOST) - Postgres/Oracle/SQLserver Thank you in advance
@DavitHuroyan5 жыл бұрын
Excellent presentation
@mateusarruda236 жыл бұрын
Great video! Worked perfectly with the MVC project!
@leondu7 жыл бұрын
hi, mosh,just finished your complete mvc5 course, it was awesome. Will you publish videos about architecting and testing in mvc ,that be complete for that course.thanks
@eddiegere7 жыл бұрын
What an amazing tutorial! Thank you.
@uddipmitra7 жыл бұрын
Mosh, where exactly on the Sql Server Management Studio 17.0 do I find the "Change Script" option?
@shortsgirl53454 жыл бұрын
bbb
@GeoffTV27 жыл бұрын
Excellent tutorial, very helpful. Many thanks.
@gyanshukla43896 жыл бұрын
really i liked your video this help me lots, i have one question that i have to install entityframework every time with respect projects ?
@shortsgirl53454 жыл бұрын
bbb
@taab845 жыл бұрын
With code first we can focus only on code and that's the purpose of the ORMs
@morelovenohate50297 жыл бұрын
Thank you so much! I needed this so bad and you popped it on the screen. all your videos are awesome i will be taking this course
@shortsgirl53454 жыл бұрын
aa
@anoopsimonlx7 жыл бұрын
Thank you Very Much , Wonderful Tutorial...
@shortsgirl53454 жыл бұрын
ccc
@Riteshtandon234 жыл бұрын
You are the best 👍💯
@nishthakapur9970165 жыл бұрын
in code first approach, we have not mentioned which field is primary key then how does it generate table with id as primary key.
@jamesmiller88476 жыл бұрын
Those Udemy ads are so repetitive lol. Great tutorials man.
@Telee_Pawt5 жыл бұрын
Looks great. If only I could get VS to work.
@alexaneals81945 жыл бұрын
I enjoyed the tutorial. However, there is one inaccuracy, you don't necessarily have to use the database designer to create tables. I have created databases with tables and views just using sql scripts. In fact, I find for me personally it is faster to type in the sql scripts.
@KDOERAK7 жыл бұрын
I am impressed: a great presentation.
@vin26297 жыл бұрын
Man you are my gold !Your tutorial on MVC was sublime and this too is fantastic. Can you please post videos on ASP.NET MVC Core Middleware. My project requires a HttpHandler which is not supported on .NET Core please help !
@vin26297 жыл бұрын
Mosh I have some piece of code to add some user data to cache,written in an ashx HttpHandler which could take this userdata as an input and add that to application cache. During SSO of the application through GatewayPortal,first this HttpHandler on the application is hit passing userinformation from GatewayPortal and HttpHandler adds the userdata into the cache on the application. We right now transitioned to ASP.NET CORE and there is no ashx support in Core. I read somewhere ASP.NET Core Middlerware is a substitute for HttpHandlers. I am curious if there are any tutorials of yours on ASP.NET Core middleware Thanks !
@emi22a4 жыл бұрын
12:57 what is the shortcut to where that search files/folders pops up?
@robimegu37123 жыл бұрын
IDK, but you can use CTRL + ; (control and semicolon) this functioning like that. This brings up the Solution Explorer's search bar and searches from that
@gbmarshall6 жыл бұрын
Question - if you have a legacy database that uses a lot of stored procedures that need re-writing - do you suggest in certain situations to rewrite in ef? And then your db code is where on the Client Windows application or on a .net console app running on the server, or asp.net on the server?
@suprajainamadugu70835 жыл бұрын
I really love this course.
@shortsgirl53454 жыл бұрын
hello
@parko19656 жыл бұрын
In this example when I query a database for case sensitive text it returns a field no matter what case is submitted against the database. How is that?
@joshe96265 жыл бұрын
Great video!!, can you make a video explaining ASP NET MVC 5 IDENTITY ?? please.
@flyingleaves54803 жыл бұрын
should we be worried about sql injections when using entity frameworks?
@TopazCentuallas7 жыл бұрын
I already saw this course and it was great!
@shortsgirl53454 жыл бұрын
aa
@heiko31696 жыл бұрын
Good explanation.BUT: you should have mentioned property attributes for code first entities. This is an essential thing! In your example code you would create 2 columns with nvarchar max (because you didnt define the string max length for those columns). And string columns in a db table with max length definition, makes things rapidly worse with high performance impact. Its a NoNo.
@nicsevern3 жыл бұрын
Exactly what I was looking for and presented concisely! Thank you!
@bibinlouis49274 жыл бұрын
I have problem with organizing fluent API configuration?? in visual studio 2019 , please can you help me?? i have enrolled in your entity framework course in udemy
@daniyalawan77597 жыл бұрын
Thank You Very Much Mosh !!
@abhinavkumar82717 жыл бұрын
Very Good Mosh.. You RockOn!!!
@BBStub35 жыл бұрын
What about if i manually add a column later in database using SQL Mngmt studio to the database i created with CodeFirst migration. will still work the app, or i have to manually open the console and write the update migration code ? i'm imagining i build database CodeFirst fashion style. and i build my app and i give the app away for users to use. then in 2-3 moths time i open sql managment studio and add a column to the table. how this will affect my running app of users ? can there be a method to be called everytime the app is opened (to update the classes properties "to add more" in case more columns appears in database) ?
@egl20047 жыл бұрын
If we get stuck while taking the course is there a specific, focused, community (ie: not StackOverflow) we can reach out to? How do we get "unstuck"?
@adnanganic74275 жыл бұрын
Thank you Mosh... This is great tutorial :)
@ahmadjaber29404 жыл бұрын
Hi! Personally I don't like the idea of code first migration so I manualy created a script to create the database scheme and then I runned >> scaffold-dbcontext -provider Microsoft.EntityFrameworkCore.SqlServer -connection "My_connection" That created the classes I need to interact with database. Is that a good thing to do or we should use the CodeFirst way? please help
@EminoMeneko4 жыл бұрын
Do you have a chapter on the different annotations in your Udemy course? Do you talk about ForeignKey or InverseProperty? What's their purpose and how to use them? Regards.
@SeanSheraton4 жыл бұрын
What was the shortcut you used to find a file in the solution? Is that an extension?
@danielakachi36666 жыл бұрын
Another awesome one!!.. Thanks..
@ambientsoda1064 жыл бұрын
Great tutorial....but visual studio has some classes for dealing with logins that read data...do you know about these classes
@redeslog18152 жыл бұрын
I liked the Class😄
@soysonialo5 жыл бұрын
this was great! thank u so much.
@shortsgirl53454 жыл бұрын
xinchao
@jameeliqbal91073 жыл бұрын
thanks mosh! Do you have a similar video for EF Core (.net 5)?
@karananeja80544 жыл бұрын
what command are you using to move between the files in Visual Studio
@babuk95723 жыл бұрын
Hi Mosh, Thank you. How to use Entity Framework with multi-database like (SQL and Oracle). One application with Multi Database. Do you have any sample videos? Please share it Thanks Babu
@matheus-il4 жыл бұрын
Thank you!!
@shortsgirl53454 жыл бұрын
hello
@abal61272 жыл бұрын
nice job. I have concern. I can see a lot of KZbin Tutorial use Entity framework( DbContext) when they want to deal with a DB. I'm a guy who uses SQl client and store procedures to deal with the DB (Since I'm good with a DB). I don't know why but I have this believe using this method, gives me more control. IS it a bad practice and why?
@markanthony45564 жыл бұрын
Great video but needs some updating to be applicable to the present date sql and .net
@bassemk65554 жыл бұрын
this course include Code-based configuration and its issues ? so , i can set custom connection parameters.
@kevoxs4 жыл бұрын
THANK YOU!!!!!
@shortsgirl53454 жыл бұрын
aa
@marifalsafi34527 жыл бұрын
Kheir az javunit bebini kheyli khub dars midi
@mazkaibil91085 жыл бұрын
i get this error: "The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception"
@longpheap95925 жыл бұрын
Maz Kaibil i have this error too.. so i create new solution project and it’s worked
@longpheap95925 жыл бұрын
Maz Kaibil this error caused when u try to add migration.. The issue is with connection string
@chicagoboy2796 жыл бұрын
What about that program class? I don't have it nor executable method to instantiate objects. Visual 2010
@UncleAlvertho5 жыл бұрын
I know a person that use model first, because your comment that you don't know people that use this approach may be the person I know is like a Sasquatch developer.
@jkerchek4 жыл бұрын
enable-migration does no longer work with EF6.4. any updates with the latest EF?
@marceloleandro3316 жыл бұрын
Hello dear, one question: Is indicated to use AsnoTracking() in Get method's all or single? it is wrong?
@backey5 жыл бұрын
Thanks David Cross :)
@j.almadhaji6 жыл бұрын
can I use entity framework to deal with two databases and make relation between their tables
@stefersonpatake6 жыл бұрын
Thanks to you, now I really understand the difference between code and database first and HOW to implement each one. 'Successfull programmers uses keyboards, not mouse' was nice! :-D
@henrygene58996 жыл бұрын
"'Successful programmers uses keyboards, not mouse' " is just plain arrogant. As in "If you don't do it MY way, you are not a good programmer!". Brilliant. When defining a project, the db design and schema is a major, primary step. Arguably, you first design the data structure that you need, then build programs around it. To do otherwise is to put the cart before the horse. Code First may be a superior method because of maintainability (it keeps the schema in line with the app), but to build your schema from code is arguably wrong; You are basically using VS/C# as an alternative editor to SQL Management studio, which is a 'highly questionable' choice.
@ztreinamento6 жыл бұрын
Great tutorial, thaks!!!
@shortsgirl53454 жыл бұрын
ccc
@ramisaadani60766 жыл бұрын
Awesome Tutorial , thanks alot
@shortsgirl53454 жыл бұрын
aa
@chiwonkim18876 жыл бұрын
good guide to EF
@makizo-nl5gx7 жыл бұрын
#Mosh fantastic videos ...loved it
@dchan52515 жыл бұрын
super ! very detail indeed ! Thank you for the introduction
@barathmanikandan6886 жыл бұрын
Thank you Mosh :)
@shortsgirl53454 жыл бұрын
xinchao
@supermankelly7 жыл бұрын
Will you be doing a EF Core course? Ideally one which assumes no knowledge like this rather than like most which assumes most people looking at EF Core know EF6.
@Gapo19945 жыл бұрын
You should add PayPal as a paying method for your courses as well :D
@valluriveeravenkatasatyapr50476 жыл бұрын
if i purchase your course from the link provided, will i see that in my Udemy list?
@Praveenkumar-ng7vf6 жыл бұрын
Hello mosh, I followed your tutorial step by step but i am getting this exception.Please help me where it went wrong. "An unhandled exception of type 'System.Data.Entity.Core.EntityException' occurred in EntityFramework.SqlServer.dll"
@PilotChrisDavis7 жыл бұрын
Hello. I am trying to follow your tutorial but once I get to the context.SaveChanges(), I get this error when I run it: + $exception {"Unable to update the EntitySet 'Posts' because it has a DefiningQuery and no element exists in the element to support the current operation."} System.Data.Entity.Infrastructure.DbUpdateException
@shailabhagwat63566 жыл бұрын
Is the identity on for the table
@cocobos6 жыл бұрын
Once you do a Code First, you'll never gonna go back to DB First, especially in MVC
@henrygene58996 жыл бұрын
Huh? If you already have your database (eg, an accounting system, or a customer's project that you walked in on), do you have any choice but to do DB First?
@cocobos6 жыл бұрын
@@henrygene5899 I'd rather proposed them to create a new system, after all, MVC is very fast to code especially code fist. You can even use the old classes to generate the DB.