added save ro update logic existing Class in the data base