I have a react/c#.NET web project where i would like to share models between server and client. I currently have several c# models on the server side similar to following:
public class Model1 {
public string Property1 {get; set;}
public string Property2 {get; set;}
}
I am passing these back to client and i am wondering if there is a way that i am unaware of where you can share the models somehow. Currently i am just manually building up a typescript model on client side which is fine but redundant. Following is example of what above class would yield in ts:
export default class Model1 {
Property1: string;
Property2: string;
}