OData / OData/ODataConnectedService
Client side entity validation support
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 84
- Forks
- 52
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 7
Description
Hi,
Validation is one of the most essential parts to keep integrity of any functioning system.
Good validation works both on server and on client.
I was wondering how we can facilitate the reuse of validation logic between server and client when using OData and OData Connected service.
I've thought about several approaches, ordered by my personal preference.
- A clear guidance on how to expose the attributes as OData Annotations and have them read and generated by the client.
- Have the validation logic defined in shared dummy metadata classes attached via
MetadataTypeAttributeattributes. - A clear pattern on using shared entities in the first place, like one of the options in Simple.OData.Client.
I think no. 2 is the most relevant solution at the moment, using the VSIX.
Took me a while to find it, but this is the kinda thing I'm talking about. It used to work back in the RIA Services days, by @jeffhandley (See this repo).
I also posted this related question on StackOverflow.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the OData Connected Service VSIX context and the MetadataTypeAttribute example linked in the issue, along with the referenced RIA Services validation repository. The issue presents several possible approaches rather than a defined change; completion would require a decided approach for reusing validation between server and client and an agreed demonstration of that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100