public async Task <IActionResult> Edit(Guid id, [Bind("Guidsales,SalesName")] Tbsale tbsale)
        {
            if (id != tbsale.Guidsales)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tbsale);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TbsaleExists(tbsale.Guidsales))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tbsale));
        }
        public async Task <IActionResult> Create([Bind("Guidsales,SalesName")] Tbsale tbsale)
        {
            if (ModelState.IsValid)
            {
                tbsale.Guidsales = Guid.NewGuid();
                _context.Add(tbsale);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tbsale));
        }