Create class with constant strings from mysql table row values
Template to create a class with constant strings from mysql table row values using .NET Core 5.
Example:
CREATE TABLE listpermissions (
permissionname varchar(255) binary NOT NULL,
PRIMARY KEY (permissionname)
)
INSERT INTO listpermissions(permissionname) VALUES
('allowedtodox'),
('allowedtodo_y');
Desired imported class:
using System;
namespace MyApp
{
public static class Permissions
{
public const string AllowedToDoX= "allowedtodox";
public const string AllowedToDoY= "allowedtodoy";
}
}
3
votes
Francis
shared this idea