I work on our Technical Marketing team, and in this tech tip video I’m going to show you how you can display SQL server data inside of Geocortex Workflow. “Hi everyone, my name is Patrick Fingler. This streamlined process allows you to get a complete picture of your assets, enabling better informed decisions. In this week’s tech tip video, we show you how can pull data from a SQL server to display in Geocortex Workflow without replicating the data. A key component of this is providing a way to efficiently connect spatial data in a GIS application with non-spatial data stored externally. We override the method and provide the form definition inside it.Ĭode specifies type parameter, thus we inform the SqlForms engine which entity to use.Geocortex Workflow extends what you can do with your Geocortex and Web AppBuilder for ArcGIS applications. You can see that is inherited from that has type parameter – this is how we tell the SqlForms engine which DbContext to use. Protected override void Define(DynamicFormBuilder builder)Į.Property(p => p.CourseID).IsPrimaryKey().IsUnique() Į.DialogButton(ButtonActionTypes.Cancel).DialogButtonĮ.DialogButtonNavigation( " CourseList", ButtonActionTypes.Cancel,īuttonActionTypes.Delete, ButtonActionTypes.Submit) Public class CourseEditForm : DynamicEditFormBase Let’s start from the entity, add a new folder “ Forms” to the “ DemoSqlForms.App” project, and create a CourseEditForm class. 3.1 CourseEditForm and CourseEdit.razor page Having Entity Framework entities or your own POCO objects means you can define which particular property to show, what UI control to use, make it mandatory or optional to submit, and also attach business rules to validate the input. The main idea of SqlForms is to give developers a tool that allows them to define UI in a C# type safe way. I only should say that for this demo, we need SchoolContext database context and the following entities with some test data: How to set up Demo Database you can see in the Appendix of this article - it is not related to the approach we demonstrate and many of you know how to use Entity Framework, so I would like not to spend your time on that. NET 5.0”, right-click on project “ DemoSqlForms.Database” and click “ Properties”. We need to make sure that the Target Framework is “. Visual Studio will create a new class library project and add it to the solution. Type “ DemoSqlForms.Database” in the Project Name and click “ Create”. In the “ Add a new project” wizard, find the “ Class Library (.NET Core)” template, select it and click “ Next”. Right-click on “ DemoSqlForms” solution (the top line in Solution Explorer), click “ Add” and click “ New Project…”. To demonstrate how to use Platz.SqlForms, we will need to create a database project. Services.AddPlatzSqlForms() 1.3 Database Project The important step is to add Platz.SqlForms initialization logic in the ConfigureServices method: Versions 0.2.0 and 0.2.1 contained bugs, so use version 0.2.2 or later.Īfter installation, you will see a readme.txt file with simple instructions, follow them. Select Platz.SqlForms and click the “ Install” button. Now we need to add the Platz.SqlForms NuGet package, right-click on the solution project and click the “ Manage NuGet Packages…” menu, then in the Browse tab, type “ Platz” search pattern and you will see Platz packages. I like to spend some time deleting the example pages ( Counter and FetchData) and their related code, but this is not necessary. Visual Studio will create a solution with a project. NET 5.0” and “ Blazor Server App” templates, and click the “ Create” button. On the next screen, specify the Project name: DemoSqlForms.App and the Solution name: DemoSqlForms and click the “ Create” button. Then find the “ Blazor App” template, select it and click the “ Next” button. NET 5.0 project DemoSqlForms.App using the Visual Studio 2019 “ Create a New Project” link. Let’s start by creating a Blazor Server App.
0 Comments
Leave a Reply. |