public async Task <IActionResult> PutMstCrmInventoryType([FromRoute] int id, [FromBody] MstCrmInventoryType mstCrmInventoryType)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != mstCrmInventoryType.InventoryTypeId)
            {
                return(BadRequest());
            }

            _context.Entry(mstCrmInventoryType).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MstCrmInventoryTypeExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PostMstCrmInventoryType([FromBody] MstCrmInventoryType mstCrmInventoryType)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _context.MstCrmInventoryType.Add(mstCrmInventoryType);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetMstCrmInventoryType", new { id = mstCrmInventoryType.InventoryTypeId }, mstCrmInventoryType));
        }