Implementing CRUD Operations with EF Core in .NET Core
This implementation demonstrates a generic repository patttern for Entity Framework Core operations in a .NET Core application.
Creating the Service Library
Create a class library project named NetCoreDemo.Services to house the data access layer.
Defining the Base Service Interface
public interface IBaseService
{
T GetById<T>(string i ...
Posted on Fri, 31 Jul 2026 16:30:30 +0000 by bogdan
Connecting PHP to MySQL Database and Basic Operations
Connecting PHP to MySQL Dataabse
<?php
$serverName = "localhost";
$userName = "root";
$password = "root";
$databaseName = "mysql";
// Create connection
$connection = new mysqli($serverName, $userName, $password, $databaseName);
// Check connection
if ($connection->connect_error) {
die("Co ...
Posted on Thu, 23 Jul 2026 16:06:47 +0000 by ErnesTo
Building a PHP Student Management System with PDO and MySQL
Database Setup
Before implementing the application, set up the MySQL database and table structure:
CREATE DATABASE IF NOT EXISTS student_db;
USE student_db;
CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
gender VARCHAR(10),
interests VARCHAR(100),
location VARCHAR(50),
notes TEXT
) ...
Posted on Wed, 08 Jul 2026 17:01:00 +0000 by v1ral
Simplifying Role Data Access with MyBatis-Plus Service Wrappers
MyBatis-Plus streamliens service creation by extending the IService interface. Begin by declaring a role service contract:
public interface ISysRoleService extends IService<SysRole> {
}
The default implemantation uses ServiceImpl, which handles dependency injection of the maper:
@Service
public class SysRoleService extends ServiceImpl< ...
Posted on Sun, 21 Jun 2026 17:02:03 +0000 by a1amattyj
Fundamental Database Operations for MySQL
Connecting and Managing Sessions
-- Connect using full parameters
mysql -h 127.0.0.1 -P 3306 -u root -p
-- Short form when connecting locally
mysql -u root -p
-- -h : target host address (IP)
-- -P : TCP port number
-- -u : username for authentication
-- -p : prompts for password if none provided inline
-- Discard current malformed statement b ...
Posted on Fri, 19 Jun 2026 17:31:47 +0000 by dabigchz
MySQL Fundamentals and Common Operations
After a prolonged break from coding, I found myself struggling to recall basic SQL syntax 😅
Reviewing my old SQL notes and adding some updates 😂
Primary references:
MySQL Documentation: https://dev.mysql.com/doc/refman/8.0/en/tutorial.html
Yi Bai Tutorial: https://www.yiibai.com/mysql
"Learning SQL" by Alan Beaulieu
Basic Operatio ...
Posted on Tue, 09 Jun 2026 17:12:16 +0000 by tidalwave
Console-Based Student Record Management with Java Arrays
Implement a student information system using Java SE with console I/O operasions. The solution applies object-oriented design patterns, separating entity definitions from controller logic while utiilzing static arrays for data persistence.
Define the domain model with private attributes and public interfaces:
class Learner {
private String ...
Posted on Sun, 07 Jun 2026 17:37:43 +0000 by RobbertvanOs
Spring Boot Essential Knowledge: One-to-Many Relationships, MyBatis-Plus, and Configuration
One-to-Many Relationship: Server-Side CRUD with Pagination
@Service
@Slf4j
public class BookServiceImpl implements BookService {
@Autowired
private BookMapper bookMapper;
@Override
public PageResult<BookModel> searchBooks(SearchCriteria criteria) {
PageHelper.startPage(criteria.getPage(), criteria.getPageSize());
...
Posted on Thu, 04 Jun 2026 17:14:43 +0000 by hrdyzlita
Integrating Python with MySQL for Database Operations
Working with SQL proficiency forms the basis for using Python modules to interact with MySQL in production tasks.
Installing and Importing the Driver
Install the MySQL driver via package manager:
pip install PyMySQL
Import the module in code:
import pymysql
Connection Object
Establishes a link to the database. Instantiate it using pymysql.con ...
Posted on Wed, 03 Jun 2026 17:24:54 +0000 by kusarigama
Integrating MongoDB with Node.js Using Mongoose
Prerequisites and Setup
Begin by installing the necessary dependencies via npm. While native drivers are available, the ODM Mongoose simplifies schema definition and query execution significantly.
Connection Configuration
Establish a connection module to manage the database session globally. Ensure the connection pool is initialized correctly f ...
Posted on Thu, 14 May 2026 17:33:25 +0000 by phpretard