i define builder.HasAlternateKey(p => p.EnrollmentId);
record inset succesfully but while updating value not update in asp.net core 6
public async Task<Response<string>> UpdateClinic(Domain.Clinic.Clinic clinicRequest)
{
var model = await _context.Clinic.AsNoTracking().FirstOrDefaultAsync(u => u.Id == clinicRequest.Id);
if (model == null)
{
return new Response<string>(400, "BadRequest");
}
Clinic sc = _mapper.Map<Clinic>(clinicRequest);
_context.Clinic.Update(sc);
await _context.SaveChangesAsync();
return new Response<string>(204, "Updated");
}