tne

My feedback

  1. 101 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne supported this idea  · 
    tne commented  · 

    Fixed in 1.0.0-beta1.

    tne shared this idea  · 
  2. 398 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne supported this idea  · 
  3. 117 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    tne supported this idea  · 
  4. 1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne shared this idea  · 
  5. 101 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne commented  · 

    Another concrete way of adding CORS functionality would be indirectly by supporting OWIN[1][2] APIs, which are increasingly popular and for which CORS implementations are already available[3].

    [1] http://owin.org/
    [2] https://data.uservoice.com/forums/72027-wcf-data-services-feature-suggestions/suggestions/5565424-owin-guidance-support
    [3] https://www.nuget.org/packages/Microsoft.Owin.Cors/

    tne commented  · 

    A few additional notes:

    - OData is probably the most complete technology to date to provide a data-access layer in a systematic yet RESTful way. Since web clients don't have access to SQL interfaces without explicit WebSockets support from the DBMS, OData is one of the best solutions currently available for thick web clients that don't necessitate a process-oriented service-layer on the server-side.

    - Because of this, it makes a lot of sense to support web clients as prime targets in the WCF Data Services project (that is, in addition to .NET and other types of clients that run in less restrictive environments).

    - The datajs library already goes a long way in enabling these applications to work nicely with OData, and is used successfully in large frameworks like JayData and Breeze.

    - Because of that popularity, the CORS issue comes up more and more often, and this trend should be expected to continue as the need for CORS and its adoption spreads.

    - The only guidance available regarding CORS in the context of WCF Data Services is a few blog posts and buried discussion threads with untested sample code for incomplete implementations of CORS support via WCF service hosts and message inspectors.

    - This requires every developer to reimplement the same code, typically partially, where CORS should really be an infrastructure detail. By partial, I mean that often no policy management of any kind is implemented, and instead all origins are systematically allowed. Many such implementations also rely on hacks and work-arounds. To summarize, current practices are not ideal and sometimes result in downright insecure software.

    - As a result, WCF Data Services is losing users on the web platform to other implementations with solid CORS support, simply because of the annoyance factor and regardless of the fact that WCF Data Services might be more appropriate than these other implementations for the application at hand.

    Example: User investigating a switch to ASP.NET Web API with OData extensions for CORS support <https://stackoverflow.com/questions/19808069/wcf-dataservice-odata-and-cors/19843014?noredirect=1#comment29653846_19843014>.

    If no direct support for CORS in WCF Data Services can be reasonably achieved in medium-term (what with all the work required for OData 4.0 and EF6 support), I'd like to suggest the sanctioning of a community implementation (through WCF service hosts and message inspectors or other more appropriate extension points) that everyone can refer to. If the coordination of such a project seems difficult, maybe asking for help to the Outercurve Foundation <http://www.outercurve.org/> would be a good idea.

    Thanks a bunch for considering these suggestions.

    tne shared this idea  · 
  6. 4 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne shared this idea  · 
  7. 11 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne supported this idea  · 
  8. 4 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

  9. 0 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne commented  · 

    (EF Code-First) You can already do this by using two .NET/CLR types/classes that you annotate using the TableAttribute[1]. You would set their Name property to the same value, but their Schema property to different values. Note that this is more of an Entity Framework issue.

    Because WCF Data Services doesn't seem to support multiple namespaces yet however[2], you'll have to use a custom convention where you prefix the name of your entities, which is not pretty. Your table names remain unaffected.

    [1] http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.schema.tableattribute.aspx
    [2] https://data.uservoice.com/forums/72027-wcf-data-services-feature-suggestions/suggestions/5543621-multiple-namespaces-per-service

  10. 1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne shared this idea  · 
  11. 8 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    tne commented  · 

    Possible workaround in less strict but related use-cases: Use a DatabaseGeneratedAttribute[1] with a Computed DatabaseGeneratedOption[2]. Modifying the SSDL directly in non-Code-First scenarios would also do the trick[3].

    If anybody wonders, I think this suggestion is distinctively different than [4].

    [1] http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.databasegeneratedattribute.aspx
    [2] http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.databasegeneratedoption.aspx
    [3] http://stackoverflow.com/a/6273481/2266481
    [4] https://data.uservoice.com/forums/72025-entity-framework-feature-suggestions/suggestions/2929682-support-database-default-values-in-code-first

  12. 1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne shared this idea  · 
  13. 40 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne commented  · 

    I think this was fixed a while ago. @Sean Hanley what version of EF are you using?

  14. 10 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

  15. 59 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne commented  · 

    Before closing, note that there doesn't seem to be an obvious way to retrieve the DbContext anymore. If that's true, the issue is relatively critical for an expected majority of users.

    https://data.uservoice.com/forums/72027-wcf-data-services-feature-suggestions/suggestions/4734171-retrieve-dbcontext-in-entityframeworkdataservice

  16. 66 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
  17. 74 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne supported this idea  · 
  18. 348 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne supported this idea  · 
  19. 1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    tne shared this idea  · 
  20. 8 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
← Previous 1

Feedback and Knowledge Base