Skip to content

.Net Or-Mapper working with dynamically implemented abstract Classes

License

Notifications You must be signed in to change notification settings

Ausm/ObjectStore

Repository files navigation

ObjectStore

Travis CI: Build Status Appveyor: Build status 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