public void SanPham_Update(SanPhamDto SPdto) { var sp = SPcontext.SanPham_GetById(SPdto.product_id); if (sp == null) { return; } SPdto.MappingSanPham(sp); SPcontext.SanPham_Update(sp); }
public void SanPham_Add(SanPhamDto SPdto) { var sp = SPdto.MappingSanPham(); SPcontext.SanPham_Add(sp); }