CPIT.DynamicForm
1.0.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CPIT.DynamicForm --version 1.0.3
NuGet\Install-Package CPIT.DynamicForm -Version 1.0.3
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="CPIT.DynamicForm" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CPIT.DynamicForm --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CPIT.DynamicForm, 1.0.3"
#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 CPIT.DynamicForm as a Cake Addin #addin nuget:?package=CPIT.DynamicForm&version=1.0.3 // Install CPIT.DynamicForm as a Cake Tool #tool nuget:?package=CPIT.DynamicForm&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Dynamic forms
It is a .Net library which helps you to create dynamic forms in your .Net app
Before You Begin
Currently, the library only contains a dynamic query builder, and will have the dynamic form logic later.
How To Use
Use the CustomBuildQuery function
The CustomBuildQuery function accepts three required parameters:
- Query: the query that you need to append the custom query to.
- Rule: the rules to build the query, see the
QueryBuilderFilterRule
class as an example of the rule object. In case you need to query a collection inside your domain class, make sure to set theField
asCollectionName.{Id}
. - InputManagerCollection: this is an instance from
InputManagerCollection
, in case of complicated queries, implementIInputManager
interface for a property and define the logic to build the query for it.
Having an issue with DateTime conversion?
You should define how you are going to convert the string field to date, this depends on your database type. The following example is for a postgres DB:
- Add this function in any extension class
public static ModelBuilder AddSqlFunctions(this ModelBuilder modelBuilder)
{
modelBuilder.HasDbFunction(() => ToDateTimeDbFunction(default))
.HasTranslation(args => new SqlFunctionExpression(
functionName: "to_date",
arguments: args.Append(new SqlFragmentExpression("'mm/dd/yyyy'")),
nullable: true,
argumentsPropagateNullability: new[] { false, true, false },
type: typeof(DateTime),
typeMapping: null));
return modelBuilder;
}
- Add the SQL function to your DBContext, inside OnModelCreating
builder.AddSqlFunctions();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Castle.DynamicLinqQueryBuilder (>= 1.2.9)
- Microsoft.EntityFrameworkCore (>= 7.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.