public void Save() { try { if (Id == 0) { DbAdapterEF.TowarInsert(this); } else { DbAdapterEF.TowarUpdate(this); } } catch (Exception ex) { log.Error(ex); throw ex; } }