Date post: | 21-Mar-2017 |
Category: |
Technology |
Upload: | winwire-technologies-inc |
View: | 349 times |
Download: | 0 times |
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.
Session Speaker
Ankaraju Seelam
Module Lead
WinWire Technologies
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
What is Entity Framework 7
New Platforms
New Data Stores
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)
Initial Release and Feature Release(s)
EF7 Nuget Packages
EF7 Nuget Packages
EF7 Nuget Packages - Console
EF7 - Migrations
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
Querying, Modifying and Saving with EF7
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
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");
}
Demo
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