public static void Delete(int[] ids, int userId) { foreach (var id in ids) { var collect = Read(id); ProductBLL.ChangeProductCollectCount(collect.ProductId, ChangeAction.Minus); } dal.Delete(ids, userId); }
public static int Add(ProductCollectInfo entity) { entity.Id = dal.Add(entity); ProductBLL.ChangeProductCollectCount(entity.ProductId, ChangeAction.Plus); return(entity.Id); }