public async Task <IActionResult> PutByNumber(int key, [FromBody] PaintWorkItem uBlastWorkItem)
        {
            var Message = "Require painting not been found.";

            if (uBlastWorkItem != null)
            {
                // set modified
                uBlastWorkItem.ModifyDate = DateTime.Now;
                uBlastWorkItem.Modifyer   = uBlastWorkItem.Modifyer ?? "Someone";

                if (uBlastWorkItem.ExtColorItem != null)
                {
                    uBlastWorkItem.ExtColorItem = null;
                }

                if (uBlastWorkItem.IntColorItem != null)
                {
                    uBlastWorkItem.IntColorItem = null;
                }

                if (uBlastWorkItem.StandradTimeExt != null)
                {
                    uBlastWorkItem.StandradTimeExt = null;
                }

                if (uBlastWorkItem.StandradTimeInt != null)
                {
                    uBlastWorkItem.StandradTimeInt = null;
                }

                return(new JsonResult(await this.repository.UpdateAsync(uBlastWorkItem, key), this.DefaultJsonSettings));
            }

            return(NotFound(new { Error = Message }));
        }
        public async Task <IActionResult> Post([FromBody] PaintWorkItem nBlastWorkItem)
        {
            if (nBlastWorkItem != null)
            {
                nBlastWorkItem.CreateDate = DateTime.Now;
                nBlastWorkItem.Creator    = nBlastWorkItem.Creator ?? "Someone";

                if (nBlastWorkItem.IntColorItem != null)
                {
                    nBlastWorkItem.IntColorItem = null;
                }

                if (nBlastWorkItem.ExtColorItem != null)
                {
                    nBlastWorkItem.ExtColorItem = null;
                }

                if (nBlastWorkItem.StandradTimeExt != null)
                {
                    nBlastWorkItem.StandradTimeExt = null;
                }

                if (nBlastWorkItem.StandradTimeInt != null)
                {
                    nBlastWorkItem.StandradTimeInt = null;
                }

                return(new JsonResult(await this.repository.AddAsync(nBlastWorkItem), this.DefaultJsonSettings));
            }
            return(NotFound(new { Error = "Not found PaintWorkItem data !!!" }));
        }