Last active
July 18, 2019 16:48
-
-
Save Warrenn/e2a933d62babd51675ab6af96d2c6b29 to your computer and use it in GitHub Desktop.
articles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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