Neo is a framework for .NET developers who want to write enterprise applications with an object-based domain model. It is well suited for domain-driven design and agile development.
Neo includes tools that create an extensible object-based domain model as well as the database schema from a an abstract description of the model. At runtime, rich schema information is used to dynamically generate all SQL required for object persistence management. Being based on ADO.NET data sets, a Neo domain model is independent of the actual backing store and works equally well with databases and objects in an XML representation.
Overview
System. Data integration
- Every entity object has a reference to its
DataRow and to the context it belongs to.
public class EntityObject {public DataRow Row { get { … }; }
public ObjectContext Context { get { … }; }
Data is stored in directly in row:
public string FirstName {set { Row[" au_ fname"] = value; }get { return Row[" au_ fname"]; }
Note how property names and column names
can be mapped. - To- one relation properties take the value from
the related object and set it as foreign key value
public class Title {public Publisher Publisher {set {Row[" pub_ id"] = value. Row[" pub_ id"];}
They use the context to find the object for the
foreign key value in the related table
get {return (Publisher) Context.GetObject(” publishers”, Row[" pub_ id"]);} - To- many relations are managed by and exposed
as typed collections
public class Publisher {public readonly TitleRelation Titles;
The relation collection objects have a reference
to the object that owns the relation and a cache
for the objects in the relation - Relation objects work much like the relation
properties. They manipulate the foreign key
column of the affected object.
public void Add( Title aTitle) {aTitle. Row[" pub_ id"] = Owner. Row[" pub_ id"];}
public void Remove( Title aTitle) {aTitle. Row[" pub_ id"] = null;}
and use the context to find objects
protected void Load() {innerList = Owner. Context. GetObjects( … );