signumsoftware / framework

Open Source framework for writing data-centric applications using the latest versions of .Net Core, C# (not-nullable), ASP.NET Web API, Typescript (strict), React, D3 and Sql Server or PostgreeSQL
https://www.signumsoftware.com/en/Framework
MIT License
222 stars 84 forks source link

Read Only property of Entity in UI #599

Closed ce-kkoziel closed 1 year ago

ce-kkoziel commented 1 year ago

Dear @olmobrutall

Is there any possibility to configure some property on entity to be read only on UI?

In my example I have CompanyEntity, and I would like to have Name property as readonly on UI.

[EntityKind(EntityKind.Main, EntityData.Transactional), PrimaryKey(typeof(Guid))]
public class CompanyEntity : Entity
{
    public string? Name { get; set; }
}
olmobrutall commented 1 year ago

Depends why you want to make it read-only there are different solutions:

ce-kkoziel commented 1 year ago

@olmobrutall thanks a lot for explanation. First method works correctly and fits to my needs.