{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/csharplang/issues/2462","repository_url":"https://api.github.com/repos/dotnet/csharplang","labels_url":"https://api.github.com/repos/dotnet/csharplang/issues/2462/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/csharplang/issues/2462/comments","events_url":"https://api.github.com/repos/dotnet/csharplang/issues/2462/events","html_url":"https://github.com/dotnet/csharplang/issues/2462","id":435979379,"node_id":"MDU6SXNzdWU0MzU5NzkzNzk=","number":2462,"title":"Suggestion：Allows developers to reuse custom classes at run time using the ‘constraint’ keyword.","user":{"login":"NMSAzulX","id":16236903,"node_id":"MDQ6VXNlcjE2MjM2OTAz","avatar_url":"https://avatars0.githubusercontent.com/u/16236903?v=4","gravatar_id":"","url":"https://api.github.com/users/NMSAzulX","html_url":"https://github.com/NMSAzulX","followers_url":"https://api.github.com/users/NMSAzulX/followers","following_url":"https://api.github.com/users/NMSAzulX/following{/other_user}","gists_url":"https://api.github.com/users/NMSAzulX/gists{/gist_id}","starred_url":"https://api.github.com/users/NMSAzulX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NMSAzulX/subscriptions","organizations_url":"https://api.github.com/users/NMSAzulX/orgs","repos_url":"https://api.github.com/users/NMSAzulX/repos","events_url":"https://api.github.com/users/NMSAzulX/events{/privacy}","received_events_url":"https://api.github.com/users/NMSAzulX/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-04-23T03:16:06Z","updated_at":"2019-04-23T06:34:50Z","closed_at":null,"author_association":"NONE","body":"We created a class with TypeBuilder/FieldBuilder/PropertyBuilder, named ClassA.\r\n\r\nDevelopers can use this class, as follows：\r\n\r\n```C#\r\n/*\r\n *    class A  (in memory)\r\n *    ----  field: string Name \r\n *    ----  field: int Age\r\n */\r\n\r\n//--keywords----variable----customer class-----\r\n    constraint  instance = Customer.CreateClassA();\r\n\r\n//  Use it like a normal class，but not dynimac.\r\n    instance.Name = \"test\";\r\n    instance.Age = 28;\r\n\r\n//There is almost no performance loss.\r\n```\r\n\r\n\r\nSome scenes.\r\n\r\nAutomatically generate entity classes according to the database table structure.\r\nType mapping from entity class fields to database table fields.\r\n\r\nIs this possible?"},"comment":{"url":"https://api.github.com/repos/dotnet/csharplang/issues/comments/485662234","html_url":"https://github.com/dotnet/csharplang/issues/2462#issuecomment-485662234","issue_url":"https://api.github.com/repos/dotnet/csharplang/issues/2462","id":485662234,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4NTY2MjIzNA==","user":{"login":"Joe4evr","id":1058562,"node_id":"MDQ6VXNlcjEwNTg1NjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1058562?v=4","gravatar_id":"","url":"https://api.github.com/users/Joe4evr","html_url":"https://github.com/Joe4evr","followers_url":"https://api.github.com/users/Joe4evr/followers","following_url":"https://api.github.com/users/Joe4evr/following{/other_user}","gists_url":"https://api.github.com/users/Joe4evr/gists{/gist_id}","starred_url":"https://api.github.com/users/Joe4evr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joe4evr/subscriptions","organizations_url":"https://api.github.com/users/Joe4evr/orgs","repos_url":"https://api.github.com/users/Joe4evr/repos","events_url":"https://api.github.com/users/Joe4evr/events{/privacy}","received_events_url":"https://api.github.com/users/Joe4evr/received_events","type":"User","site_admin":false},"created_at":"2019-04-23T06:34:50Z","updated_at":"2019-04-23T06:34:50Z","author_association":"NONE","body":"> We know the fields, properties, and methods of this class (which is business-related)\r\n\r\nBut how will the compiler know that these fields, properties, and methods are valid?"}}
{"actor":{"display_login":"Joe4evr"}}