EasyAbp / AbpHelper.CLI

Providing code generation and more features to help you develop applications and modules with the ABP framework.
MIT License
285 stars 95 forks source link

Feature: add or remove properties in an existing entity #115

Open gdlcf88 opened 4 years ago

gdlcf88 commented 4 years ago

For example, there is a "Todo" entity with the property "Title":

public class Todo : Entity<Guid>
{
    public virtual string Title { get; protected set; }

    public virtual string Content { get; protected set; }
}

Now I want to remove the "Title" and add a new Guid? property named "UserId", I can use the following commands:

abphelper xxx remove Title
abphelper xxx add Guid? UserId

So the entity file, localization files, DTO files, ViewModels files, Index.cshtml, index.js will be changed, and a new EF migration file will also be generated.