I have a use case where we generate a lot of custom profiles based on the specific data modelling requirements. I am trying to find a way to create models out of it(c# classes) so that it can be serialized and deserialized and represented in the way that conforms to the profile constraints. I have seen many implementations to validate against profiles, but none on the generation aspect. Please let me know if there is a way to achieve this.
PS: All the resource types used are FHIR base resources.