public SanPhamTrungBay Add(SanPhamTrungBay SanPhamTrungBay)
        {
            var result = _daoDisplayProduct.SanPhamTrungBays.Add(SanPhamTrungBay);

            _daoDisplayProduct.SaveChanges();
            return(result);
        }
        public bool UpdateProduct(SanPhamTrungBay SanPhamTrungBay)
        {
            var result = _daoDisplayProduct.SanPhamTrungBays.Where(sp => sp.Id == SanPhamTrungBay.Id).Single();

            result.Image = SanPhamTrungBay.Image;
            result.Name  = SanPhamTrungBay.Name;


            return(_daoDisplayProduct.SaveChanges() == 1);
        }
        public bool AddProduct(SanPhamTrungBay SanPhamTrungBay)
        {
            var result = _daoDisplayProduct.SanPhamTrungBays.Add(SanPhamTrungBay);

            return(_daoDisplayProduct.SaveChanges() == 1);
        }