public async Task <ActionResult <vLeaves> > PostvLeaves(vLeaves vLeaves)
        {
            _context.vLeaves.Add(vLeaves);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetvLeaves", new { id = vLeaves.EmployeeLeaveId }, vLeaves));
        }
        public async Task <IActionResult> PutvLeaves(int id, vLeaves vLeaves)
        {
            if (id != vLeaves.EmployeeLeaveId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }