Skip to content

Instantly share code, notes, and snippets.

@CoreProgramm
Created May 6, 2020 19:55
Show Gist options
  • Save CoreProgramm/02e6adfa2054bc76b2cee6b4d77e2b15 to your computer and use it in GitHub Desktop.
Save CoreProgramm/02e6adfa2054bc76b2cee6b4d77e2b15 to your computer and use it in GitHub Desktop.
Introduction to ASP.NET MVC
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