grpc-C# CodeFirst like EF?

397 views
Skip to first unread message

Yingting Xu

unread,
Jun 3, 2015, 4:59:35 AM6/3/15
to grp...@googlegroups.com
Hello,

I love the Entity Framework code first feature. I know, C# code will be generated by using protoc base *.proto file.

But, I more love to def *.proto file, and then coding my C# code rather than generate it. 

how to do that?

thanks very much!

yinting

Wolfgang Grieskamp

unread,
Jun 3, 2015, 11:01:27 AM6/3/15
to Yingting Xu, grpc-io
I agree this would be an interesting addition to GRPC, in multiple languages.

Such a feature should in my opinion support round tripping, such that you can start with annotated code, generate proto from it, but also take the proto and modify it and inject the changes back into the code. Not sure whether the Entity framework does this, but older frameworks like in WCF/WSDL used to do so to some extent. It's based on isolating user written and generated stub code via sub-classing.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/8551fc4b-02f3-48d0-b538-530d1dffb574%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jan Tattermusch

unread,
Jun 5, 2015, 7:26:35 PM6/5/15
to Yingting Xu, grp...@googlegroups.com
Well, https://code.google.com/p/protobuf-net/ might be somewhat similar to what you are talking about. Basically, it allows you to serialize POCO classes into protobuf wire format based on field annotations. Nevertheless, protobuf-net is not supported by gRPC. For various reasons, we rather support 

On Wed, Jun 3, 2015 at 1:59 AM, Yingting Xu <w...@xyting.org> wrote:

--
Reply all
Reply to author
Forward
0 new messages