t@mickwd:~/projects/das$

projects / das

┌─ Database app

das

A C# desktop app on SQL Server that adds, edits, deletes and lists records through a data access layer I wrote by hand.

## Summary

The Libreria project: a WinForms app that talks to SQL Server through one data access class (Access), which wraps the connection, the commands and the readers. The Person model handles its own create, update and delete.

## What it shows

  • A data access layer on SqlConnection, SqlCommand and SqlDataReader.
  • A Person model with Insert, Update, Delete and List.
  • IDs generated with ExecuteScalar.
  • UI, model and data access kept in separate layers.

## Excerpt

Libreria/Access.cs
internal class Access
{
    private SqlConnection connection;

    public void Open()  { /* opens the connection */ }
    public void Close() { /* closes and disposes it */ }

    public int Write(string sql)            { /* ExecuteNonQuery */ }
    public SqlDataReader Reader(string sql) { /* ExecuteReader */ }
}