public class ProductService : IProductService { private IProductRepository _productRepository; // Some initlization stuff public Product GetProduct(int id) { try { return _productRepository.GetProduct(id); } catch (Exception e) { // log, wrap then throw } } }
public interface IFormService { Form GetFormById(int formId); Form GetFormByName(string formName); bool AddElement(FormElement form); bool AddForm(Form form); }
public ProductController(IProductService productService , IFormService fwrepository) { this.productService = productService; this.fwrepository = fwrepository; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)