public Territories Territories_SaveEntity(Territories entity) { if (entity != null) { entity.Save(); if (entity.RowState != esDataRowState.Deleted && entity.RowState != esDataRowState.Invalid) { return(entity); } } return(null); }