nboyz98
nboyz98
CC#
Created by nboyz98 on 5/14/2023 in #help
❔ GRPC design oneof or separate Rpc
Hi there, I have a system which i'm trying to expose via GRPC protobufs. Assume we have 5 different types of records with some shared fields and some custom fields in each record type. At the moment i can think of exposing it like this: message Record { string id = 1; string shared_field1 = 2; string shared_field2 = 3; oneof <type1_fields, type2_fields, type3_fields> custom_fields = 4; } The other option is for a separate message per record type which includes the custom fields in each.
5 replies
CC#
Created by nboyz98 on 5/13/2023 in #help
❔ extension method mappers for classes which are already defined? Mapster
Hello everyone! Does anyone here know if there's a way to use Mapster to generate static extension method mappers for classes which have already been defined in a project? (I.e. ones that aren't source generated. As far as i can tell there's only mappers which can be generated in this case?) https://github.com/MapsterMapper/Mapster/wiki/Interface-base-Code-generation)
2 replies