Giter Site home page Giter Site logo

ef-core-orientation's Introduction

dotnet add package Microsoft.EntityFrameworkCore.Sqlite
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 5.0.3 dotnet add package Pomelo.EntityFrameworkCore.MySql --version 3.2.4

// Database created with Code First dotnet tool install --global dotnet-ef
dotnet add package Microsoft.EntityFrameworkCore.Design dotnet ef migrations add InitialCreate //Create migration

// Create migration for n tier application dotnet ef migrations add InitialCreate --startup-project ../app.webui //app.webui project start point.

dotnet ef database update // If n tier application dotnet ef database update --startup-project ../app.webui

dotnet ef migrations add addColumnProductCategoryId //new column, new migrations dotnet ef database update //new update

dotnet ef database uptade dönmek_istenilen_nokta //güncellemeyi geriye alabiliyoruz. o migrations'un down metodu çalıştı. lokalde migrations duruyor fakat database'den alınıyor. lokalden de silmek için aşağıdaki komutu kullanabilirsin.

dotnet ef migrations remove //lokalde migrations silinir. ama sadece database den silinmiş olanlar silinir. database den silinmemiş olanlar varsa hata verir.

dotnet ef database update 0 //bütün migrationlar veritabanında siliniyor. 0. adıma gelinmiş olunuyor.

dotnet ef database drop --force //database'i siler.

// Database first with Northwind database

komut sonrası -h koyarak yardım olaylarını görebilirsin.

dotnet ef dbcontext scaffold [arguments] [options]

dotnet ef dbcontext scaffold "server=localhost;port=3306;database=northwind;user=root;" "Pomelo.EntityFrameworkCore.MySql" --output-dir "Data/EfCore" --context NorthwindContext

ef-core-orientation's People

Contributors

t4h4 avatar

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.