DinaData es una utilidad de emergencia que permite crear nuevos campos en las entidades de tu proyecto dotnet de forma inmediata cuando éste ya está en explotación, sin necesidad de modificar el fuente, la base de datos o los formularios.
$ dotnet add package DinaDataDinaData es una utilidad de emergencia que permite crear nuevos campos en la entidades de tu proyecto dotnet de forma inmediata cuando éste ya está en explotación, sin necesidad de modificar el fuente, la base de datos o los formularios.
Dinadata reutiliza un campo string de tu entidad y almacena sobre él múltiples campos dinámicamente en formato Json. Estos nuevos campos se definen en tu web o app.config en un parámetro de tu appSettings. En la prácica, DinaData funciona como un nuevo tipo de dato.
public string etc { get; set; } // your extra field
[NotMapped]
public DinaData dinaetc // new property
{
get { return new Dinadata(etc); }
set { etc = value.ToString(); }
}
En cuantos de tus proyectos te has encontrado con que, una vez analizado exhaustivamente, desarrollado, publicado y ya en explotación, salen nuevos requisitos que te obligan a crear nuevos campos urgentemente ?
Con DinaData puedes añadir nuevos campos a las entidades de tu proyecto en caliente. No necesitas tocar el código de tu programa, ni modificar la estructura de tus base de datos, ni siquiera modificar los formularios, ni publicar una nueva versión.
Basta con definir el nuevo dato en la sección tu appSettings de to web.config o app.config
Está desarrollado en .net para proyectos .net.
Dinadata necesita el paquete Newtonsoft.Json y la libreria ConfigurationManager
> install-package DinaData
public string etc { get; set; } // your extra field
[NotMapped]
public Dinadata dinaetc // new property
{
get { return new Dinadata(etc); }
set { etc = value.ToString(); }
}
Incorporar las nuevas plantillas Razor para dinadata.cshtml en las carpetas de Views/Shared EditorTemplates y DisplayTemplates
Sustituir en tus formularios Create, Edit, Details el campo extra por el campo Dinadata
- @Html.EditorFor(x => x.etc)
+ @Html.EditorFor(x => x.dinaetc)
- @Html.DisplayFor(x => x.etc)
+ @Html.DisplayFor(x => x.dinaetc)
<add key="dinaetc_Teams" value="{}"/>
Y eso es todo. Te piden un nuevo campo ? Lo añades en tu app.config o web.config
<add key="dinaetc_Teams" value="{'Stadium' : {}}"/>
Si no es de tipo texto, necesitarás definir su tipo según la sintaxis html para campos input
<add key="dinaetc_Teams" value="{'Stadium' : {}, 'Founded in' : {'type' : 'date'}, 'Cups' : {'type' : 'number'}}"/>
The MIT License (MIT)
Copyright (c) 2021 UNDERSAT IT S.L.
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.