locked
WCF Data Service 5.6 + EF 6 Code First + Alpha Provider with Stream Provider RRS feed

  • Question

  • Hi, I need some help please. I've tried to implement a stream provider along with EntityFrameworkDataService Provider. I, then, implemented IServiceProvider on my Data Service as it's recommended in this series of article about StreamProvider.

    But I'm not able to set up the CSDL file (HasStream Attribute) in code first to suit the needs for having a Service Type StreamProvider enabled. 

    Is There something I messed up or a way to register properly my StreamProvider with EF6 Code First ? Does I have to implement a MetadaServiceProvider ?

    Thanks for helping me.



    Sunday, June 1, 2014 1:17 PM

Answers

  • Hello,

    Thanks for replying me,

    I've already try that attribute without to succeed. I resolve it by applying [NamedStream("StreamLink")]  on my entity, and then I was able to intecept IDataServiceStreamProvider2 into GetService Implementation of IServiceProvider.

    Regards.

    Monday, June 2, 2014 10:24 PM

All replies

  • Hello,

    >>But I'm not able to set up the CSDL file (HasStream Attribute) in code first to suit the needs for having a Service Type StreamProvider enabled.

    You may need this attribute: HasStreamAttribute and try to mark your code first entity with this attribute. For details, you can check this discussion:

    http://stackoverflow.com/questions/6793231/how-to-stream-images-or-any-blob-in-odata-service-using-code-first

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 2, 2014 5:32 AM
    Moderator
  • Hello,

    Thanks for replying me,

    I've already try that attribute without to succeed. I resolve it by applying [NamedStream("StreamLink")]  on my entity, and then I was able to intecept IDataServiceStreamProvider2 into GetService Implementation of IServiceProvider.

    Regards.

    Monday, June 2, 2014 10:24 PM
  • Hello,

    Being glad to hear that you got it working and thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 3, 2014 6:25 AM
    Moderator