asp.net mvc business layer implementation
using didongexpress.domains;
using didongexpress.repos;
using didongexpress.repos.Repos;
using System.Collections.Generic;
namespace didongexpress.bus.Bus
{
public interface IProductBusiness : IBusiness
{
List<ProductIndex> AllProducts();
}
public class ProductBusiness : Business, IProductBusiness
{
public ProductBusiness(IUnitOfWork unit) : base(unit)
{
}
public List<ProductIndex> AllProducts()
{
var products = _unit.Get<IProductRepository>().AllProducts();
return products;
}
}
}