Abstract crud edit logic