Giter Site home page Giter Site logo

jonpsmith / efcoreinaction Goto Github PK

View Code? Open in Web Editor NEW
338.0 338.0 145.0 1.72 MB

Supporting code to go with the book "Entity Framework Core in Action"

Home Page: https://www.manning.com/books/entity-framework-core-in-action?a_aid=su4utaraxuTre8tuthup&a_bid=4cef27ce

License: MIT License

efcoreinaction's People

Contributors

jonpsmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

efcoreinaction's Issues

Is checking !db.Books.Any() necessary after EnsureDeleted followed by EnsureCreated?

I am reading the chapter one right now. I found the WipeCreateSeed as follows:

db.Database.EnsureDeleted();
db.Database.EnsureCreated();
if (!db.Books.Any())
{
   WriteTestData(db);
   Console.WriteLine("Seeded database");
}

My question: Is if (!db.Books.Any()) necessary here? We already have a brand new database before if (!db.Books.Any()) so !db.Books.Any() always return true, IMHO.

Inconsistent connection string

The connection string shown in page 14

private const string ConnectionString =
@” Server = (local db)\nssql local dv;
Database=MyFirstEfCoreDb;
Trusted_Connection=True”;

is inconsistent with the one used in the code hosted in the git.

        private const string ConnectionString =           
            @"Server=(localdb)\mssqllocaldb;
             Database=MyFirstEfCoreDb;
             Trusted_Connection=True";

Confusing about the book content page 84

Hi Jon,
I love your book and the way that you explained is easy to me to understand. However, there is a concern I still need to confirm. In the page 84 of the book, there is a sentence :
Also, the Find method isn’t affected by a model-level filter.

So what you means is we can actually get the soft-deleted item by using Find method? Can you share any resource that mentioned about it?

Thank you very much.

Upgrading this repo to .Net Core 3.0

Hi @JonPSmith , how are you?

Thank you for a wonderful book on the EF Core.

As EF Core 3.0 is GA now, will you be releasing -

  1. A new edition of your book that refers to EF Core 3.0 and
  2. Updated version of this GitHub repo that works with EF Core 3.0 ?

Thank you.

Chapter 2 - Compiling in VS 2019

Hi Jon,

I just started reading this book. Really appreciate the detailed explanations on EFCore. I've downloaded the entire source code for Chapter 2 but unable to compile in VS 2019, .NET Core 3.1. Do you have any guideline on how do we migrate the codes from VS 2017 to VS 2019? Thanks.

Regards,

Jordan Lim

Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException

Hey Jon
I am getting this Exception when I am trying to update ICollection<Reviews>

'Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded

I have tried many solutions . but not worked !!

could you please help me ?

Book image missing in confirmed order in chapter 4

Just a minor thing overall, but anyway:

The book icon is showing only a broken image on the confirmed order page after checkout. That's because OneOrderPartial.cshtml in line 15 is setting the source to "#" instead of "@lineItem.ImageUrl". In addition there are books without image URLs, so a check if it's not null is necessary I guess. The same problem in ListBasketPartial.cshtml where the image source is set to "#" when it's null.

The ImageUrl needs to be set in DisplayOrderService.cs in line 60 or so as well with "ImageUrl = lineItem.ChosenBook.ImageUrl," to be loaded in the OrderListDTO

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.