public void Update(TEntity entity)
 {
     using (ReCapContext context = new ReCapContext())
     {
         var updatedEntity = context.Entry(entity);
         updatedEntity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }