Entity Framework Core with ASP.NET Core Overview

Click here to load reader

  • date post

    23-Feb-2017
  • Category

    Technology

  • view

    1.950
  • download

    4

Embed Size (px)

Transcript of Entity Framework Core with ASP.NET Core Overview

PowerPoint Presentation

ASP.NET Core*Shahed ChowdhuriSr. Technical Evangelist @ [email protected] A Quick Overview of ASP.NET Core* aka ASP.NET 5 before RC1

ASP.NETWeb APIActive Server Pages(Classic ASP)

ASP.NET(Web Forms)

ASP.NETMVC1/2/3/4/5ASP.NETWeb Pages

ASP.NETMVC 6

Unified MVC, Web API and Web PagesASP.NETWeb APIActive Server Pages(Classic ASP)

ASP.NET(Web Forms)

ASP.NETMVC1/2/3/4/5ASP.NETWeb Pages

ASP.NETMVC 6Core MVC

Unified MVC, Web API and Web PagesEvolution of ASP and ASP .NET

C# 6.0.NET Framework 4.6ASP.NET 5(runs on .NET Core 5 or .NET Framework 4.5.2+)ASP.NET MVC 6.NET Core 5SignalR 3C# 6.0.NET Framework 4.6ASP.NET 5 Core 1.0(runs on .NET Core 5 1.0or .NET Framework 4.5.2+)ASP.NET MVC 6Core MVC.NET Core 5.NET Core 1.0

SignalR 3Names & Version Numbers

ASP.NET Core High-Level Overview

Compilation Process

What About .NET Framework 4.6?

How about Entity Framework?

DBORMEntities in Code

Entity Framework Core*Shahed ChowdhuriSr. Technical Evangelist @ [email protected] The Future of EF for ASP.NET Core* aka EF7 before RC1

EF Core Agenda OverviewModels and FieldsConnection StringsAdd Initial MigrationAdditional MigrationsControllers and ViewsMigration History and Snapshots

Shahed ChowdhuriWeb Application SecurityOverviewSQL InjectionCross-Site Scripting (XSS)Data ExposureIn the Real WorldNext StepsQ&A

9

DB-Driven Web ApplicationsDatabaseWeb AppInternet

UsersORM

10

Models and FieldsC# classes with data types, annotated with attributes

11

Connection StringsAdded with DB Context Options in Startup.ConfigureServices()

12

Connection Strings in DevelopmentMore info: http://docs.asp.net/en/latest/security/app-secrets.html

13

Connection Strings in AzureMore info: https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure

14

Add Initial Migration *>dnvm use 1.0.0-rc1-update1

>dnx ef migrations add initial

>dnx ef database update

* Subject to change after RC2, see official documentation: https://docs.efproject.net/en/latest/platforms/aspnetcore/new-db.html

15

Add Additional Migrations *>dnvm use 1.0.0-rc1-update1

>dnx ef migrations add FriendCode

>dnx ef database update* Subject to change after RC2, see official documentation: https://docs.efproject.net/en/latest/platforms/aspnetcore/new-db.html

16

EF Migration CommandsMore info: https://msdn.microsoft.com/en-us/magazine/mt614250.aspx

17

Controllers and Views

18

Migration History and Snapshots

19

Email: [email protected] Twitter: @shahedC

Contact

Microsoft email: [email protected] Twitter: @shahedC

Dev Blog: WakeUpAndCode.com

20