Skip to content

stuarthillary/ObjectStore

 
 

Repository files navigation

ObjectStore

Travis CI: Build Status Appveyor: Build status MyGet: MyGet CI Nuget: NuGet Pre Release

.Net Or-Mapper working with dynamically implemented abstract Classes

##How to Use?

Simply write classes like:

[Table("Entity1")]
public abstract class Entity1
{
    [Mapping(FieldName="EntityId"), IsPrimaryKey]
    public abstract int Id { get; }

    [Mapping(FieldName = "TextField")]
    public abstract string Text { get; set; }

    [ForeignObjectMapping("Entity2Id")]
    public abstract Entity2 Entity2 { get; set; }

    [ReferenceListMapping(typeof(Entity3), "Entity1PropertyName")]
    public abstract ICollection<Entity3> SubEntities { get; }
}

Initialize with: ObjectStoreManager.DefaultObjectStore.RegisterObjectProvider(new RelationalObjectStore("connectionString", true));

Call: ObjectStoreManager.DefaultObjectStore.GetQueryable<Entity1>(); to get Entity-Objects derived from the given Class, with INotifyPropertyChanged implemented...

About

.Net Or-Mapper working with dynamically implemented abstract Classes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.5%
  • PowerShell 0.5%