I am just curious of the design decisions for the following interface:
/// The interface for the data access logic for the menu entity
public interface IMenuGateway
So, we use the interface to access the data in our service like so:
IMenuGateway gateway = new MenuGateway();
Does the abstraction of the interface facilitate writing unit tests? or abstracting the data access layer in the scenario where one might swap out LINQ for say NHibernate?
My assumption is so the service is accessing it's data via a IMenuGateway interface, and as long as it has a valid contract (IMenuGateway ), it (service) is not concerned about the implementation, in fact it is decoupled from the data access implementation,
which it should be, right?