/// <summary>
        /// Insert/Update Parts Department Picklist
        /// </summary>
        /// <param name="se"></param>
        /// <returns></returns>
        public async Task <bool> PartsDepartmentUpdateAsync(PicklistPartsDepartment se)
        {
            bool result = true;

            using (_context)
            {
                try
                {
                    var model = await _context.PicklistPartsDepartment.FirstOrDefaultAsync(p => p.PartsDeptID == se.PartsDeptID);

                    if (model == null)
                    {
                        _context.PicklistPartsDepartment.Add(se);
                    }
                    else
                    {
                        _context.PicklistPartsDepartment.Update(se);
                    }

                    await _context.SaveChangesAsync();
                }
                catch (Exception)
                {
                    result = false;
                }
            }
            return(result);
        }
        public async Task <ActionResult <PicklistPartsDepartment> > PostPartsDepartment([FromBody] SimpleModel list)
        {
            PicklistPartsDepartment model = Newtonsoft.Json.JsonConvert.DeserializeObject <PicklistPartsDepartment>(list.Name);
            var response = this.StatusCode((int)HttpStatusCode.OK, await _service.PartsDepartmentUpdateAsync(model));

            _service.Dispose();
            return(response);
        }