Created
May 6, 2020 19:55
-
-
Save CoreProgramm/02e6adfa2054bc76b2cee6b4d77e2b15 to your computer and use it in GitHub Desktop.
Introduction to ASP.NET MVC
This file contains 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 Customer | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public string Address { get; set; } | |
public string Mobile { get; set; } | |
} | |
public interface ICustomerRepository | |
{ | |
Customer GetCustomer(int id); | |
void Save(Customer customer); | |
} | |
public class CustomerRepository : ICustomerRepository | |
{ | |
public Customer GetCustomer(int id) | |
{ | |
// Logic to retrieve customer details | |
} | |
public void Save(Customer customer) | |
{ | |
// Logic to save customer details | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment