Created
July 18, 2019 16:47
-
-
Save Warrenn/4c6f2cd876edbd505a889be6ac997b4e to your computer and use it in GitHub Desktop.
article - seperate
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 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