SlideShare uma empresa Scribd logo
1 de 22
12 e 13 de abril de 2019
São Paulo, Brasil
Conectando Pessoas,
Processos e Tecnologia
#MVPConf
Trilha .NET
Deep-Dive on EntityFramework Core 2.2/3.0
Rafael Almeida
Microsoft MVP
#MVPConf
YouTube.com/codereadybr
LinkedIn.com/in/ralmsdeveloper
Twitter.com /ralmsdeveloper
Github.com/ralmsdeveloper
Rafael Almeida
Microsoft MVP, MCC & MCP
Arquiteto de Sistemas at STONE
Casado e pai de três princesas, as mais lindas!
Victória, Maria Heloysa e Maria Eduarda
Criador/Mantenedor EFCore.FirebirdSQL
Contribuidor projetos Github (Microsoft Open Source)
EntityFramework Core e EntityFramework Core for Oracle (Microsoft)
.ralms.net
Doação para Entidades
#MVPConf
Toda a renda obtida com a venda dos ingressos
para o MVPConf LATAM 2019 serão doados para
cinco Entidades beneficentes.
Uma em cada região do Brasil!
Consulte no site as Entidades beneficiadas!
MVPConf.com.br
Patrocinadores
#MVPConf
#MVPConf
Agenda
The
.NETCore
.NET
Foundation
Jornada
Open
Source
Aquisições EF Core 2.1 EFCore 2.2 EF Core 3.0 Demos
#MVPConf
DESKTOP WEB CLOUD MOBILE GAMING IoT AI
.NETCore
Your platform for building anything
.NET
ECOSYSTEM
macOSiOS
ASP.NET SignalR
.NET SDK for Hadoop
.NET Compiler Platform ("Roslyn")
.NET Micro Framework
ASP.NET MVC
ASP.NET Web API
ASP.NET Web Pages
MVVM Light Toolkit
.NET Core
Orleans
MEF
OWIN Authentication Middleware
Orchard CMS
Microsoft Azure SDK for .NET
IdentityManager
Mimekit
Xamarin.Auth
Couchbase Lite for .NET
Mailkit
ASP.NET Core
Salesforce Toolkits for .NET
NuGet
Kudu
Cecil
MSBuild
LLILC
Prism
WorldWide Telescope
ASP.NET AJAX Control Toolkit
Entity Framework
Microsoft Azure WebJobs SDK
Microsoft Web Protection Library
Open Live Writer
Open XML SDK
ProtoBuild
System.Drawing
IdentityServer
Umbraco
WCF
Xamarin.Mobile
Mono
Xamarin SDK
Cake
Steeltoe
Nancy
xUnit
DotNetNuke
SourceLink
nUnit
MvvmCross
IronPython
ILMerge
ML.NET
Infer.NET
JSON.NET
#MVPConf
.NET
2001
ECMA 335
2002
NET 1.0 for
Windows released.
Mono project
begins
2008
ASP.NET MVC
(web platform)
open source
April 2014
.NET Compiler
Platform (“Roslyn”)
open source
.NET Foundation
founded
Nov. 2014
.NET Core
(cross-platform)
project begins
2016
Mono project joins
.NET Foundation
Aug. 2017
.NET Core 2.0
released
June 2018
.NET Core 2.1
released
#MVPConf
Example: StringBuilder
private static readonly StringBuilder s_builder = new StringBuilder();
public void StringBuilderAppend()
{
StringBuilder sb = s_builder;
sb.Length = 0;
for (int i = 0; i < 100_000; i++)
sb.Append(i);
}
Toolchain Mean Allocated
.NET Core 2.0 6.523 ms 3992000 B
.NET Core 2.1 3.268 ms 0 B
#MVPConf
Example: Strings
public string StringToLowerChangesNeeded() =>
"This is a test to see what happens when we call ToLower.".ToLower();
public string StringToLowerAlreadyCased() =>
"this is a test to see what happens when we call tolower.".ToLower();
Method Toolchain Mean Allocated
StringToLowerChangesNeeded .NET Core 2.0 187.00 ns 144 B
StringToLowerChangesNeeded .NET Core 2.1 96.29 ns 144 B
StringToLowerAlreadyCased .NET Core 2.0 197.21 ns 144 B
StringToLowerAlreadyCased .NET Core 2.1 68.81 ns 0 B
#MVPConf
Engenheiros do EFCore
#MVPConf
EF Core 2.1 Major Features
#MVPConf
EF Core 2.2 Major Features
#MVPConf
Configurations
Como funcionava até 2.1?
http://ralms.net/dica/dicaapplyconfiguration/
#MVPConf
Exemplo
public class SampleDbContext : DbContext
{
public SampleDbContext(DbContextOptions<SampleDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new LoginConfiguration());
modelBuilder.ApplyConfiguration(new ClienteConfiguration());
modelBuilder.ApplyConfiguration(new EnderecoConfiguration());
modelBuilder.ApplyConfiguration(new CidadeConfiguration());
modelBuilder.ApplyConfiguration(new ProdutoConfiguration());
modelBuilder.ApplyConfiguration(new EstoqueConfiguration());
modelBuilder.ApplyConfiguration(new ...);
}
}
#MVPConf
Chuck Norris
var mappingTypes = assembly
.GetTypes()
.Where(x =>
!x.IsAbstract
&& x.GetInterfaces()
.Any(y =>
y.GetTypeInfo().IsGenericType
&& y.GetGenericTypeDefinition() == typeof(IEntityTypeConfiguration<>)));
var entityMethod = typeof(ModelBuilder).GetMethods()
.Single(x => x.Name == "Entity" &&
x.IsGenericMethod &&
x.ReturnType.Name == "EntityTypeBuilder`1");
foreach (var mappingType in mappingTypes)
{
var genericTypeArg = mappingType.GetInterfaces().Single().GenericTypeArguments.Single();
var genericEntityMethod = entityMethod.MakeGenericMethod(genericTypeArg);
var entityBuilder = genericEntityMethod.Invoke(modelBuilder, null);
var mapper = Activator.CreateInstance(mappingType);
mapper.GetType().GetMethod("Configure").Invoke(mapper, new[] { entityBuilder });
}
#MVPConf
Solução tabajara, perfeita!
public class SampleDbContext : DbContext
{
public SampleDbContext(DbContextOptions<SampleDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
var assembly = typeof(SampleDbContext).Assembly;
modelBuilder.ApplyConfigurationsFromAssembly(assembly);
}
}
#MVPConf
Hint’s SQL
With NOLOCK
Sorteios dos Brindes
#MVPConf
Clique Aqui para Iniciar o Sorteio
Somente participarão dos sorteios os
participantes que estiverem inscritos
nas palestras e responderem as
pesquisas de satisfação.
OBRIGADO
#MVPConf
YouTube.com/codereadybr
LinkedIn.com/in/ralmsdeveloper
Twitter.com /ralmsdeveloper
Github.com/ralmsdeveloper
.ralms.net
THANKS!

Mais conteúdo relacionado

Semelhante a MVPCONF Latam 2019

Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 Enhancements
Robert MacLean
 
支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒
Toki Kanno
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009
nkaluva
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan
 

Semelhante a MVPCONF Latam 2019 (20)

Certified Core Java Developer
Certified Core Java DeveloperCertified Core Java Developer
Certified Core Java Developer
 
Novidades do c# 7 e 8
Novidades do c# 7 e 8Novidades do c# 7 e 8
Novidades do c# 7 e 8
 
Expanding your impact with programmability in the data center
Expanding your impact with programmability in the data centerExpanding your impact with programmability in the data center
Expanding your impact with programmability in the data center
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Core Java Certification
Core Java CertificationCore Java Certification
Core Java Certification
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)
 
Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 Enhancements
 
The future for Software developers by 2040
The future for Software developers by 2040The future for Software developers by 2040
The future for Software developers by 2040
 
Daniel Egan Msdn Tech Days Oc
Daniel Egan Msdn Tech Days OcDaniel Egan Msdn Tech Days Oc
Daniel Egan Msdn Tech Days Oc
 
Spark Your Legacy (Spark Summit 2016)
Spark Your Legacy (Spark Summit 2016)Spark Your Legacy (Spark Summit 2016)
Spark Your Legacy (Spark Summit 2016)
 
powershell-is-dead-epic-learnings-london
powershell-is-dead-epic-learnings-londonpowershell-is-dead-epic-learnings-london
powershell-is-dead-epic-learnings-london
 
Stateful patterns in Azure Functions
Stateful patterns in Azure FunctionsStateful patterns in Azure Functions
Stateful patterns in Azure Functions
 
Donetconf2016: The Future of C#
Donetconf2016: The Future of C#Donetconf2016: The Future of C#
Donetconf2016: The Future of C#
 
支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009
 
#CNX14 - Building Killer Apps - Moving Beyond Transactions to Experiences
#CNX14 - Building Killer Apps - Moving Beyond Transactions to Experiences#CNX14 - Building Killer Apps - Moving Beyond Transactions to Experiences
#CNX14 - Building Killer Apps - Moving Beyond Transactions to Experiences
 
Transfer Learning: Repurposing ML Algorithms from Different Domains to Cloud ...
Transfer Learning: Repurposing ML Algorithms from Different Domains to Cloud ...Transfer Learning: Repurposing ML Algorithms from Different Domains to Cloud ...
Transfer Learning: Repurposing ML Algorithms from Different Domains to Cloud ...
 
Netw 208 Success Begins / snaptutorial.com
Netw 208  Success Begins / snaptutorial.comNetw 208  Success Begins / snaptutorial.com
Netw 208 Success Begins / snaptutorial.com
 
Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 

Último

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

MVPCONF Latam 2019

  • 1. 12 e 13 de abril de 2019 São Paulo, Brasil Conectando Pessoas, Processos e Tecnologia
  • 2. #MVPConf Trilha .NET Deep-Dive on EntityFramework Core 2.2/3.0 Rafael Almeida Microsoft MVP
  • 3. #MVPConf YouTube.com/codereadybr LinkedIn.com/in/ralmsdeveloper Twitter.com /ralmsdeveloper Github.com/ralmsdeveloper Rafael Almeida Microsoft MVP, MCC & MCP Arquiteto de Sistemas at STONE Casado e pai de três princesas, as mais lindas! Victória, Maria Heloysa e Maria Eduarda Criador/Mantenedor EFCore.FirebirdSQL Contribuidor projetos Github (Microsoft Open Source) EntityFramework Core e EntityFramework Core for Oracle (Microsoft) .ralms.net
  • 4. Doação para Entidades #MVPConf Toda a renda obtida com a venda dos ingressos para o MVPConf LATAM 2019 serão doados para cinco Entidades beneficentes. Uma em cada região do Brasil! Consulte no site as Entidades beneficiadas! MVPConf.com.br
  • 8. #MVPConf DESKTOP WEB CLOUD MOBILE GAMING IoT AI .NETCore Your platform for building anything
  • 9. .NET ECOSYSTEM macOSiOS ASP.NET SignalR .NET SDK for Hadoop .NET Compiler Platform ("Roslyn") .NET Micro Framework ASP.NET MVC ASP.NET Web API ASP.NET Web Pages MVVM Light Toolkit .NET Core Orleans MEF OWIN Authentication Middleware Orchard CMS Microsoft Azure SDK for .NET IdentityManager Mimekit Xamarin.Auth Couchbase Lite for .NET Mailkit ASP.NET Core Salesforce Toolkits for .NET NuGet Kudu Cecil MSBuild LLILC Prism WorldWide Telescope ASP.NET AJAX Control Toolkit Entity Framework Microsoft Azure WebJobs SDK Microsoft Web Protection Library Open Live Writer Open XML SDK ProtoBuild System.Drawing IdentityServer Umbraco WCF Xamarin.Mobile Mono Xamarin SDK Cake Steeltoe Nancy xUnit DotNetNuke SourceLink nUnit MvvmCross IronPython ILMerge ML.NET Infer.NET JSON.NET
  • 10. #MVPConf .NET 2001 ECMA 335 2002 NET 1.0 for Windows released. Mono project begins 2008 ASP.NET MVC (web platform) open source April 2014 .NET Compiler Platform (“Roslyn”) open source .NET Foundation founded Nov. 2014 .NET Core (cross-platform) project begins 2016 Mono project joins .NET Foundation Aug. 2017 .NET Core 2.0 released June 2018 .NET Core 2.1 released
  • 11. #MVPConf Example: StringBuilder private static readonly StringBuilder s_builder = new StringBuilder(); public void StringBuilderAppend() { StringBuilder sb = s_builder; sb.Length = 0; for (int i = 0; i < 100_000; i++) sb.Append(i); } Toolchain Mean Allocated .NET Core 2.0 6.523 ms 3992000 B .NET Core 2.1 3.268 ms 0 B
  • 12. #MVPConf Example: Strings public string StringToLowerChangesNeeded() => "This is a test to see what happens when we call ToLower.".ToLower(); public string StringToLowerAlreadyCased() => "this is a test to see what happens when we call tolower.".ToLower(); Method Toolchain Mean Allocated StringToLowerChangesNeeded .NET Core 2.0 187.00 ns 144 B StringToLowerChangesNeeded .NET Core 2.1 96.29 ns 144 B StringToLowerAlreadyCased .NET Core 2.0 197.21 ns 144 B StringToLowerAlreadyCased .NET Core 2.1 68.81 ns 0 B
  • 14. #MVPConf EF Core 2.1 Major Features
  • 15. #MVPConf EF Core 2.2 Major Features
  • 16. #MVPConf Configurations Como funcionava até 2.1? http://ralms.net/dica/dicaapplyconfiguration/
  • 17. #MVPConf Exemplo public class SampleDbContext : DbContext { public SampleDbContext(DbContextOptions<SampleDbContext> options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.ApplyConfiguration(new LoginConfiguration()); modelBuilder.ApplyConfiguration(new ClienteConfiguration()); modelBuilder.ApplyConfiguration(new EnderecoConfiguration()); modelBuilder.ApplyConfiguration(new CidadeConfiguration()); modelBuilder.ApplyConfiguration(new ProdutoConfiguration()); modelBuilder.ApplyConfiguration(new EstoqueConfiguration()); modelBuilder.ApplyConfiguration(new ...); } }
  • 18. #MVPConf Chuck Norris var mappingTypes = assembly .GetTypes() .Where(x => !x.IsAbstract && x.GetInterfaces() .Any(y => y.GetTypeInfo().IsGenericType && y.GetGenericTypeDefinition() == typeof(IEntityTypeConfiguration<>))); var entityMethod = typeof(ModelBuilder).GetMethods() .Single(x => x.Name == "Entity" && x.IsGenericMethod && x.ReturnType.Name == "EntityTypeBuilder`1"); foreach (var mappingType in mappingTypes) { var genericTypeArg = mappingType.GetInterfaces().Single().GenericTypeArguments.Single(); var genericEntityMethod = entityMethod.MakeGenericMethod(genericTypeArg); var entityBuilder = genericEntityMethod.Invoke(modelBuilder, null); var mapper = Activator.CreateInstance(mappingType); mapper.GetType().GetMethod("Configure").Invoke(mapper, new[] { entityBuilder }); }
  • 19. #MVPConf Solução tabajara, perfeita! public class SampleDbContext : DbContext { public SampleDbContext(DbContextOptions<SampleDbContext> options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { var assembly = typeof(SampleDbContext).Assembly; modelBuilder.ApplyConfigurationsFromAssembly(assembly); } }
  • 21. Sorteios dos Brindes #MVPConf Clique Aqui para Iniciar o Sorteio Somente participarão dos sorteios os participantes que estiverem inscritos nas palestras e responderem as pesquisas de satisfação.