Skip to content

Instantly share code, notes, and snippets.

@Warrenn
Created July 18, 2019 16:47
Show Gist options
  • Save Warrenn/4c6f2cd876edbd505a889be6ac997b4e to your computer and use it in GitHub Desktop.
Save Warrenn/4c6f2cd876edbd505a889be6ac997b4e to your computer and use it in GitHub Desktop.
article - seperate
public class Client
{
public int Id { get; set; }
public string Name { get; set; }
public int Amount { get; set; }
}
public class Repository
{
public DataContext Context { get; set; }
public void SaveData(Client client)
{
DataContext.Clients.Add(this);
DataContext.Clients.SaveChanges();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment