Living Lab
e-SUAP
Data Access (Server Side)
Modeling
Data and entity modeling rely completely on Visual Studio Standard entity framework visual modeling
plug-in. This part of the framework is still in evolution and will cover, hereafter, all the features of Entity
Framework 5 and 6, like inheritance, polyphormism, complex relationships etc.
From EDMX logical and physical model can be derived SQL DDL for generating the database layer, server
side entities for extracting and storing domain information, return to clients through web services or
fast and reliable JSON based web API controllers DTO's for distributed data management.
Code Generation
Domain entities dedicated code can be generated both on the server and client side. On the server side
we'll provide you with a C# oriented T4 template for generating:
 an ObjectContext or DBContext derived class with all the stuff necessary for dealing with
Entity Framework contexts;
 Repository pattern and IPoco classes for every entity provided through the EDMX data
model
Repository Pattern
The repository pattern is implemented through a particular contract. For example the address entity:
Generates, thanks to the T4 template, the following code parts:
 Partial repository generic interface for entity Address:
o public partial interface IAddressRepository : IRepository<Address> { }
 The repository implementation for entity Address:
o public partial class EntityAddressRepository :
CodeArchitects.Data.Entity.Repository<Address>, IAddressRepository
 And the Entity Ipoco object:
o public partial class Address : IObjectWithChangeTracker,
INotifyPropertyChanged
 Primitive properties
 Complex properties
 Navigation properties
 ChangeTracking
 Association Fixup
Entity typical usage patterns
Unit container registration:
Retrieving repository objects through unity container and retrieve data:
Saving data:

e-SUAP - Data access server side (English)

  • 1.
  • 2.
    Modeling Data and entitymodeling rely completely on Visual Studio Standard entity framework visual modeling plug-in. This part of the framework is still in evolution and will cover, hereafter, all the features of Entity Framework 5 and 6, like inheritance, polyphormism, complex relationships etc. From EDMX logical and physical model can be derived SQL DDL for generating the database layer, server side entities for extracting and storing domain information, return to clients through web services or fast and reliable JSON based web API controllers DTO's for distributed data management.
  • 3.
    Code Generation Domain entitiesdedicated code can be generated both on the server and client side. On the server side we'll provide you with a C# oriented T4 template for generating:  an ObjectContext or DBContext derived class with all the stuff necessary for dealing with Entity Framework contexts;  Repository pattern and IPoco classes for every entity provided through the EDMX data model Repository Pattern The repository pattern is implemented through a particular contract. For example the address entity:
  • 4.
    Generates, thanks tothe T4 template, the following code parts:  Partial repository generic interface for entity Address: o public partial interface IAddressRepository : IRepository<Address> { }  The repository implementation for entity Address: o public partial class EntityAddressRepository : CodeArchitects.Data.Entity.Repository<Address>, IAddressRepository  And the Entity Ipoco object: o public partial class Address : IObjectWithChangeTracker, INotifyPropertyChanged  Primitive properties  Complex properties  Navigation properties  ChangeTracking  Association Fixup Entity typical usage patterns Unit container registration:
  • 5.
    Retrieving repository objectsthrough unity container and retrieve data:
  • 7.