This app is designed to connect to a main database, manage remote database connections, and execute stored procedures on those remote databases.
All releases and Latest Release
To use the OGRIT Database Custom App, follow these steps:
-
Setup:
- Ensure you have the required dependencies installed. Refer to the Dependencies section for a list of required packages.
- Install the .NET SDK and any other necessary tools like Visual Studio and SQL Server Management Studio (SSMS).
-
Configuration:
- Main Database Connection: Configure the connection to your main database where remote database connection strings will be stored. Set the Connection and Procedure tables names and schemas in the config.
- Remote Database Connections: Use the application interface to add or update connection details for remote databases.
- Stored Procedures: Ensure that the main database has the stored procedures you intend to execute. The procedures must return queries as strings so that they can get executed in remote databases.
-
Running the Application:
- Launch the application from your development environment or executable.
- Log in using your main database credentials.
- Navigate to the Connection Management screen to add, update, or delete remote database connections.
- Go to the Procedure Listing screen to view and select stored procedures.
- Execute selected procedures on the chosen remote databases.
-
Example Usage:
- To execute a stored procedure, select the procedure from the list and choose the remote database connections where you want it executed.
- The application will connect to each remote database, execute the procedure, and save the results if needed ( specified on OnReturnExecute ).
First Contributor: Leonit Shabani
Second Contributor: Burak Efe Şişman
This project is licensed under the MIT License. See the LICENSE file for details.
MIT License
Copyright (c) 2024 Leonit Shabani
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.
-
.NET Framework/Core
- Ensure you have the appropriate version of .NET installed. You can download it from the official .NET website.
-
Entity Framework Core
- Used for database operations.
dotnet add package Microsoft.EntityFrameworkCore dotnet add package Microsoft.EntityFrameworkCore.SqlServer
- Used for database operations.
-
Dapper
- A simple object mapper for .NET.
dotnet add package Dapper
- A simple object mapper for .NET.
-
Microsoft.Extensions.Configuration
- For handling configuration settings.
dotnet add package Microsoft.Extensions.Configuration dotnet add package Microsoft.Extensions.Configuration.Json
- For handling configuration settings.
-
Microsoft.Extensions.DependencyInjection
- For dependency injection.
dotnet add package Microsoft.Extensions.DependencyInjection
- For dependency injection.
-
Newtonsoft.Json
- For JSON serialization and deserialization.
dotnet add package Newtonsoft.Json
- For JSON serialization and deserialization.
-
Xunit
- For unit testing.
dotnet add package xunit dotnet add package xunit.runner.visualstudio
- For unit testing.
-
Moq
- For mocking in unit tests.
dotnet add package Moq
- For mocking in unit tests.
Installation
To install all dependencies, you can use the following command in the terminal:
dotnet restore
Additional Tools
- Visual Studio: Recommended IDE for development. You can download it from the official Visual Studio website.
- SQL Server Management Studio (SSMS): For managing your SQL Server databases. Download it from the official SSMS website.
- User Authentication: Log in to your main database.
- Connection Management: Store remote database connection details in the main database.
- Procedure Listing: Display and manage lists of stored procedures.
- Stored Procedures Execution: Execute stored procedures from the main database to selected remote databases. The procedures must return results as strings, and the result table in the main database must match the structure of the data returned.
Common Features:
-
User Authentication: Implement a login system to authenticate users against their main database. Validation can be done using methods like Windows Authentication or SQL Server Authentication.
-
Connection Management: Store and manage remote database connection details in the main database. Users can add, update, or delete connection strings.
-
Procedure Listing: Provide an interface to list all available stored procedures in a selected database. Users can view details and select procedures to execute.
-
Stored Procedures Execution: Allow users to execute stored procedures on selected remote databases. Ensure that the procedures return their results as strings, and the result table in the main database matches the data structure returned.
-
Menu Navigation: Provide a centralized menu for navigating between screens, such as managing connections, viewing procedures, executing procedures, and logging out.
-
Responsive UI Design: Ensure the UI adapts to different screen sizes, keeping elements like buttons, forms, and tables usable across various display settings.
-
Data Grid Management: Use data grid views to display information about database connections and stored procedures. Allow sorting, filtering, and interaction with the grid data.