Create class with constant strings from mysql table row values

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
francis
Posts: 19
Joined: Tue 23 Dec 2014 21:13

Create class with constant strings from mysql table row values

Post by francis » Tue 30 Mar 2021 17:33

Hi,

Is there any template to create a class with constant strings from mysql table row values?

I am using .NET Core 5.

Code: Select all

CREATE TABLE list_permissions (
  permission_name varchar(255) binary NOT NULL,
  PRIMARY KEY (permission_name)
)
INSERT INTO list_permissions(permission_name) VALUES
('allowed_to_do_x'),
('allowed_to_do_y');
Desired imported class:

Code: Select all

using System;
namespace MyApp
{
    public static class Permissions
    {
        public  const string AllowedToDoX= "allowed_to_do_x";
        public  const string AllowedToDoY= "allowed_to_do_y";
    }
}

Shalex
Site Admin
Posts: 9305
Joined: Thu 14 Aug 2008 12:44

Re: Create class with constant strings from mysql table row values

Post by Shalex » Wed 31 Mar 2021 17:16

This functionality is currently not available. Please submit your suggestion at https://devart.uservoice.com/forums/386 ... -developer.

Post Reply