Skip to content

Instantly share code, notes, and snippets.

@Warrenn
Last active July 18, 2019 16:48
Show Gist options
  • Save Warrenn/e2a933d62babd51675ab6af96d2c6b29 to your computer and use it in GitHub Desktop.
Save Warrenn/e2a933d62babd51675ab6af96d2c6b29 to your computer and use it in GitHub Desktop.
articles
public class Client
{
public int Id { get; set; }
public string Name { get; set; }
public int Amount { get; set; }
public DataContext Context { get; set; }
public Client()
{
Context = new DataContext();
}
public void SaveData()
{
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