0
marcosli created
Hello guys,
I'm thinking of building a structure for external repositories to consume xml and json, however I would like to know if anyone here has already done this or have any ideas whatsoever to preserve an aspnetzero structure?
Thank you.
1 Answer(s)
-
0
Hi,
As I understand, you just need to create arbitrary classes. An example would be:
public interface IProductRepository { List<Product> GetAll(); } public class ProductRepository : IProductRepository, ITransientDependency { public List<Product> GetAll() { //TOD: get from XML/JSON } }
If you like, you may not use IProductRepository, but I suggest that abstraction.