class CustomerRepository
{
private readonly Database database;

public CustomerRepository(Database database)
{
this.database = database;
}

public void Add(string CustomerName)
{
database.AddRow("Customer", CustomerName);
}
}

class Database
{
public void AddRow(string Table, string Value)
{
}
}
public class CustomerRepository
{
private readonly Database database;

public CustomerRepository(Database database)
{
this.database = database;
}

public void Add(string CustomerName)
{
database.AddRow("Customer", CustomerName);
}
}
class Database : IDatabase
{
public void AddRow(string Table, string Value)
{
}
}
interface IDatabase
{
void AddRow(string Table, string Value);
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store