public async Task <ActionResult <FreshersDetail> > PostFreshersDetail(FreshersDetail freshersDetail)
        {
            _context.FreshersDetails.Add(freshersDetail);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetFreshersDetail", new { id = freshersDetail.FresherId }, freshersDetail));
        }
        public async Task <IActionResult> PutFreshersDetail(int id, FreshersDetail freshersDetail)
        {
            if (id != freshersDetail.FresherId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }