OData / ModelBuilder

A project to generate Edm (Entity Data Model) from CLR types
19 stars 19 forks source link

Capabilities vocabulary #7

Closed g2mula closed 4 years ago

g2mula commented 4 years ago

Issues

This pull request adds partial capabilities vocabulary around permissions.

Description

Adding support for a subset of the capabilities vocabulary ie

Checklist

xuzhg commented 4 years ago

for brainstorm:

1) we hard cording the restrictions type, it works. However, everytime, we change the type definition, we have to change it. So, can we codegen the CLR types from the Edm complex type definition, so, we don't need to hard coding the types.

2) can we have a CapbilitiesVocabularyConfiguration class and CapbilitiesVocabularyConfiguration class. All others derived from these. For example:

    DeleteRestrictionConfiguration : CapbiliteisVocabularyConfigation
    {
        public DeleteRestricitonConfiguration Deleteable(bool) { ... return this; }
        pubic Permissions(...) { ... return this; }
   }

NavigationSourceCOnfiguration might have HasDelectRestriction(...), HasReadRestriction()...

Developer can call in chain:

navigationSource.HasDeleteRestriction().Deleteable(false).Permissions(...);

3). Add test cases for example to better understand the usage