EF Core 2.0 with WinForms (fow newbs)

I recently got a task of writing a simple winforms app. Some cruds and nothing more. Buyer doesn’t care how it will work, I’ve got some legacy code he had from previous guy and most of the work was done using ADO + some existing DB, he also did some EF6. I have plenty time left till the deadline, so I decided that it is a wonderful opportunity to try and learn EF. Started with EF 6, but soon I understood that it is not in the active development and Ef Core is the future.

So I have the tables, and sometimes the classes (though both are subject to change if needed). I need some step-by-step instruction on what to do with it to make it work.

As I understand it now. I need to have a Model e.g. Room. A EfModel HotelRoom (though I dunno what the difference), a DBContext RoomContext.

Previous guy tried to implement EF6, So I have some code left from him. He used things like EntityConnectionBuilder which doesn’t exist in EF core as far as I can tell

submitted by /u/Grasher134
[link] [comments]

Leave a Reply