DinaData 1.0.8

dotnet add package DinaData --version 1.0.8
NuGet\Install-Package DinaData -Version 1.0.8
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DinaData" Version="1.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DinaData --version 1.0.8
#r "nuget: DinaData, 1.0.8"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DinaData as a Cake Addin
#addin nuget:?package=DinaData&version=1.0.8

// Install DinaData as a Cake Tool
#tool nuget:?package=DinaData&version=1.0.8

DinaData

DinaData 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.

COMO FUNCIONA

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(); }
        }

PARA QUE SIRVE

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

QUE NECESITAS

  • un proyecto dotnet
  • un campo extra varchar(MAX) en cada una de tus tablas (ejemplo: etc VARCHAR(MAX))
  • el paquete newtonsoft.json, si aún no lo tienes.
  • la libreria ConfigurationManager
  • formularios Razor para Create Edit y Details

PASOS PARA IMPLEMENTAR DINADATA

  1. Instalar DinaData de nuget
 > install-package DinaData
  1. Extender tu campo extra en la clase que mapea tu tabla de esta forma
        public string etc { get; set; } // your extra field
        
        
        [NotMapped]
        public Dinadata dinaetc // new property
        {
            get { return new Dinadata(etc); }
            set { etc = value.ToString(); }
        }
  1. Incorporar las nuevas plantillas Razor para dinadata.cshtml en las carpetas de Views/Shared EditorTemplates y DisplayTemplates

  2. 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) 
  1. definir un parámetros en tu appSettings y añadirle nuevos campos
    <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'}}"/>

DOCUMENTACION

Documentación aquí

LIVE DEMO

Demo interactiva aquí

LICENCIA

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.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.8 120 1/16/2024
1.0.7 464 3/22/2022
1.0.6 427 2/14/2022
1.0.5 427 1/20/2022