-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
Hi,
I'm trying to migrate into Grpc Code-First.
I thrown into a big problem.
I have a project called xyz.Commons in this project I just defined ResponseBase class, Like below:
public abstract class ResponseBase
{
public bool IsSuccess { get; set; }
public string Message { get; set; }
}
So in xyz.Presentation.Dto prject I have something similar to this:
public class CreateUserResponse: ResponseBase { }
public class UpdateUserResponse: ResponseBase { }
and ...
from #19 I learnt that I should have something similar tho this:
[ProtoInclude(10, typeof(CreateUserResponse))]
[ProtoInclude(11, typeof(UpdateUserResponse))]
public abstract class ResponseBase
{
[DataMember(Order = 1)]
public bool IsSuccess { get; set; }
[DataMember(Order = 2)]
public string Message { get; set; }
}
Which is terrible IMAO. I can't update my xyz.Common project on every changes, because it's a nuget package.
I just wanna use Sharing by doing this inheritance, I don't even think of Polymorphism there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels