Welcome To DataTier.Net Home
Setup Instructions - 3 Easy Steps
Step 1: Create DataTier.Net Database
1. Create a new database in SQL Server Management Studio named DataTier.Net.Database
2. Check the box 'DataTier.Net Database Has Been Created:
As the instructions indicate, this will launch SQL Server Management Studio. You may be prompted to login.
Execute the SQL script to install DataTier.Net tables and stored procedures.
Geeky Note: DataTier.Net was built using DataTier.Net.
Step 2: Install DataTier.Net Project Templates Installer VSIX
You can install the project Template into Visual Studio 2017 and / or 2019 (recommended).
Step 3: Build Your Connection String and Setup App.config
Build your connection string, and once enabled click the Install Conn String & Setup App.config button.
You will be shown a message box you must restart Visual Studio to complete the setup.
Open the project again in Visual Studio and run DataTier.Net. You should see Test Database Connection Passed.
Now you are ready to create your own DataTier.Net projects.
Anatomy of a DataTier.Net Project
There are four projects that make up a DataTier.Net project:
1. Application Logic Component Contains the Controller Manager and Managers for each table and Data Operations (stored procedure calls).
2. Data Access Component Contains the Data Manager and Managers for each table which contain Data Readers and Data Writers.
3. Gateway Contains methods for Find, Load, Save and Delete plus any Custom Methods you create.
4. Object Library The object library uses partial classes and two files are created for each table or view in your database:
Do not add any code to the data class or it will be overwritten next time you build with DataTier.Net. The file .data.cs is code generated every time you build with DataTier.Net.
The .business.cs is only created if it does not already exist, so you are free to add any custom methods or properties to the business class.
For more information read the DataTier.Net User's Guide located in the Class Room folder if you clone or online here: https://github.com/DataJuggler/DataTier.Net/blob/master/DataTier.Net/Class%20Room/Documents/DataTier.Net%20Users%20Guide.pdf
-- Update 9.11.2019: I now have a new website: https://www.datajuggler.com
I built this site using C#, SQL Server, Blazor and DataTier.Net.
Blazor is my new favorite web development platform.
Update 9.4.2019: Data Juggler joined Twitter today! Ask your DataTier.Net questions @Data_Juggler.
Update 8.29.2019: I created two short videos today:
DataTier.Net 101 - Class #2 - How To Create Enumerations https://youtu.be/vzVAiiulyUs
DataTier.Net 101 - Class #3 - How To Delete A Table https://youtu.be/uJ30y6JHYKs
Update 8.23.2019: I am excited to announce the release of DataTier.Net version 1.3.0.
This version works with either .Net Framework or .Net Core. I have only tested with Blazor Preview 8, and you must use tthe pre release preview of System.Data.SQLClient 4.7.0+ for it to work with Blazor.
For .Net Framework projects, 4.6.1 of System.Data.SqlClient is installed when you add the Nuget package DataJuggler.Net.
If you have previously installed the project templates, you will need to uninstall and reinstall the templates as they have been updated.
When you create a DataTier.Net.ClassLibrary project, you now must add two Nuget packages.
- DataJuggler.Core.UltimateHelper to Application Logic Component
- DataJuggler.Net to Data Access Component.
I did try to make the project templates install the Nuget packages automatically and never could get it to work.
Instructions for .Net Core / Blazor, or if you prefer to use Environment Variables over Connection Strings in an app.config or web.confg:
Create an Environment Variable and give it a name for your project.
In Windows 10 Search Box type: Edit Environment Variables For Your Account
Create an Environment Variable and set the value to the connection string you want to use.
Then when you create an instance of the Gateway, pass in the connection name:
// set the connectionName string connectionName = "DataJugglerWebConnection"; // Create a new instance of a 'Gateway' object, and set the connectionName Gateway gateway = new Gateway(connectionName);
Note: you must use Nuget Package DataJuggler.Core.UltimateHelper version 1.3.5 or greater, as this includes a new class EnvironmentVariableHelper.cs.
Blazor tutorials and videos are coming soon, I just wanted to publish a release with DataTier.Net working for .Net Framework and .Net Core.
Update 8.31.2019: I released version 1.3.2 today. I fixed a bug where new tables or views would not change the selected table in the Data Editor (Manage Data Button Click) unless the project had been saved and opened.
Update 8.19.2019: I am learning Blazor Preview 8 and Dot Net Core, and quickly found out all of my connection strings stopped working due to the lack of an app.config or web.config.
My first thought was to add this Microsoft.Extensions.Configuration & Microsoft.Extensions.Configuration.JSon, but this added about a dozen depenency Nuget packages, so instead I am making a breaking change for the Version 2 of the project templates.
The breaking change is going to be when you create a Gateway object, you must pass an enivonment variable name for the Connection String.
I learned how to create Environment variables today, and I have to admit I felt kind of stupid all the years I commented out connection strings for Dev, Test & Production machines.
It is 2019, and like or not Dot Net Core is the future (mostly not for me so far, but I still like 8 tracks).
I am going to finish my project in Blazor for my website before I make the new change.
So far Blazor is pretty cool, but Dot Net Core takes some getting used to.
Update 8.11.2019: I just published a new video on YouTube: 'How To Create Custom Methods With DataTier.Net': https://www.youtube.com/watch?v=655uS4wU_aU
Update 8.7.2019: I just created a new video 'Build A Complete C# / SQL Server Application In 15 Minutes With DataTier.Net' (thanks to NuGet magic). https://www.youtube.com/watch?v=nS7pKZvOaSM
DataTier.Net is an all stored procedure alternative to Entity Framework.
After cloning, right click the solution and select 'Manage Nuget Packages for Solution'. Then click the 'Restore' button.
Rebuild the solution. You may need to set DataTier.Net.Client project as the Startup Project: DataTier.Net\DataTier.Net\Client
I also included a new Connection String Builder form.
Please visit my YouTube channel to see the latest videos on DataTier.Net.
This page will be updated as I just learned how to use Git Hub pages today.
Update 7.13.2019: I learned how to install Project Templates using VSIX installers, so now using DataTier.Net is easier than ever before.
I updated the Quick Start Guide in both Word and PDF format, which is located in the DataTier.Net Class Room here: