For my personal projects and to contribute to my portfolio, I developed an end to end Employee Management System. I started out by using SQL Server since I am comfortable with it.
However, I decided to transition to NoSQL and intend to use GridDB in that matter. It is because, usually, a biometric device is used for recording a timestamped data for an employee’s attendance. The efficiency and optimized speed of data storage and retrieval makes GridDB a great option for this application.
However, while reading the GridDB Documentation I am unable to figure out if there is an integration with GridDB possible. Thank you in advance for helping me trying to figure out the issue.
PS: this is the code that I used for connecting to SQL Server:
using Dapper;
using EmployeeManagementDAL.Interface;
using System.Data;
using System.Data.SqlClient;
using EmployeeManagementModels;
using System.ComponentModel.DataAnnotations.Schema;
namespace EmployeeManagementDAL
{
public class EmployeeRepo : EmployeeRepoInterface
{
string connectionString = "Data Source="Device Name";Initial Catalog=EmployeeManagementSystem;User ID="admin";Password="admin"";
public List<Employee> GetEmployees()
{
string output_query = "SELECT [Id], [Name], [Designation], [Department] FROM Employee;";
IDbConnection connection = null;
using (connection = new SqlConnection(connectionString))
{
if (connection.State != ConnectionState.Open)
{
connection.Open();
}
List<Employee> AllEmployees = connection.Query<Employee>(output_query).ToList();
connection.Close();
return AllEmployees;
}
}
public void addEmployee(Employee emp)
{
DynamicParameters parameters = new DynamicParameters();
parameters.Add("@Name", emp.Name, DbType.String);
parameters.Add("@Designation", emp.Designation, DbType.String);
parameters.Add("@Department", emp.Department, DbType.String);
string output_query = "INSERT INTO [dbo].[Employee] (Name, Designation, Department) VALUES (@Name, @Designation, @Department);";
IDbConnection connection = null;
using (connection = new SqlConnection(connectionString))
{
if (connection.State != ConnectionState.Open)
{
connection.Open();
}
connection.Query<Employee>(output_query, parameters);
connection.Close();
}
}
}
}