leverage entity framework 7 in business application design
TRANSCRIPT
![Page 1: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/1.jpg)
Leverage Entity Framework 7 in
Business Application Design Notes:
If you experience audio issues during the webinar, you can dial in through telephone details provided to you in your
registration confirmation email.
Please feel free to post questions in the questions dialog and we will try to answer as many as we can at the end.
Recording of this session will be shared in next 24-48 hours.
You can also write to us at [email protected] for any clarifications or information.
![Page 2: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/2.jpg)
Session Speaker
Ankaraju Seelam
Module Lead
WinWire Technologies
![Page 3: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/3.jpg)
Agenda
Querying, Modifying and Saving with EF7
EF7 Nuget Packages
Initial Release and Feature Release(s)
What’s new in Entity Framework 7
Recommend vs Not Recommend EF7
1
2
3
4
5
Modeling -- Shadow Properties
Demo
6
7
![Page 4: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/4.jpg)
What is Entity Framework 7
New Platforms
New Data Stores
![Page 5: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/5.jpg)
EF7 - New Platforms, New Data Stores
New Platforms
• Traditional .NET
• ASP.NET 5
• Windows 10 UAP
• Mac
• Linux
New Data Stores
• Relational & Non-Relational• Not a magic abstraction
• High level services that are useful on all/most
stores
• Non-common concerns handled by provider
extensions
• Example Providers• Relational (SQL Server, SQLite, Postgres, SQL
Compact etc.)
• Azure Table Storage
• Redis
• In Memory (for testing)
![Page 6: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/6.jpg)
Initial Release and Feature Release(s)
![Page 7: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/7.jpg)
EF7 Nuget Packages
![Page 8: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/8.jpg)
EF7 Nuget Packages
![Page 9: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/9.jpg)
EF7 Nuget Packages - Console
![Page 10: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/10.jpg)
EF7 - Migrations
![Page 11: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/11.jpg)
Querying, Modifying and Saving with EF7
Defining DbContext
and DbSet as always
Querying and Update
as You’ve always
done
Testing interaction
with In-Memory
provider
Batch Updates Working with
disconnected entities
More explicit
disconnected graph
behaviors
![Page 12: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/12.jpg)
Querying, Modifying and Saving with EF7
![Page 13: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/13.jpg)
Recommend vs Not Recommend EF7
Recommend EF7 for
• New ASP.NET 5 Applications
• Trying out new features to
provide feedback
EF7 is NOT recommend for
• Update existing applications that
use EF& or earlier
• Application with complex data
access requirements
• Applications that need O/R
features not yet implemented
• Targeting databases other than
Microsoft SQL Server
![Page 14: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/14.jpg)
Shadow Properties
1) Shadow properties are properties that do not exist in your entity class.
2) The value and state of these properties is maintained purely in the Change Tracker.
3) Shadow Properties values can be obtained and changed through the “Change Tracker” API.
Shadow properties are defined in the OnModelCreating event, which is exposed as an overridable
method in DBContext. Here is an example of attaching a DateTime property called LastUpdated to the
Blog entity.
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Blog>().Property<DateTime>("LastUpdated");
}
![Page 15: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/15.jpg)
Demo
![Page 16: Leverage Entity Framework 7 in Business Application Design](https://reader031.vdocuments.site/reader031/viewer/2022030306/58d0623d1a28ab10448b57b7/html5/thumbnails/16.jpg)
Q & A
Next Webinar
Topic : Business Transformation with Azure IoT
Suite
When: March 23rd at 9 AM PT
http://www.winwire.com/blog-winsights/
www.twitter.com/winwire
www.winwire.com