public void CreateProductColor(ProductColor productColor)
 {
     if (productColor != null && productColor.RGB != null)
     {
         DBConnector.manager.InsertQuery(productColor);
     }
 }
        public ProductColor CreateProductColorReturn(ProductColor productColor)
        {
            if (productColor != null && productColor.RGB != null)
            {
                return(this.GetByID(DBConnector.manager.InsertQueryReturn(productColor)));
            }

            return(null);
        }
        public ProductColor EditProductColor(string rgb, string name, int id)
        {
            ProductColor productColor = this.GetByID(id);

            if (productColor != null)
            {
                DBConnector.manager.FastUpdate <ProductColor>(data =>
                {
                    ProductColor pColor = (data as ProductColor);
                    if ((data as ProductColor).ID == id)
                    {
                        pColor.RGB  = rgb;
                        pColor.Name = name;
                        return(pColor);
                    }
                    return(null);
                });

                return(productColor);
            }

            return(null);
        }