OData / OData/ODataConnectedService

Client side entity validation support

Open
#80 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
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.

  1. A clear guidance on how to expose the attributes as OData Annotations and have them read and generated by the client.
  2. Have the validation logic defined in shared dummy metadata classes attached via MetadataTypeAttribute attributes.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.