public int SaveSandingSystem(rosh_sendingSystems res) { try { if (res.id == 0) { db.rosh_sendingSystems.Add(res); db.SaveChanges(); } else { try { db.Entry(res).State = EntityState.Modified; db.SaveChanges(); } catch (OptimisticConcurrencyException ex) { RDL.Debug.LogError(ex); } } } catch (Exception ex) { RDL.Debug.LogError(ex); } return(res.id); }
public rosh_sendingSystems GetSandingSystem(int id) { var res = new rosh_sendingSystems(); res = db.rosh_sendingSystems.FirstOrDefault(o => o.id == id); return(res); }
public void SaveSandingSystem(rosh_sendingSystems res) { try { db.SaveSandingSystem(res); } catch (Exception ex) { RDL.Debug.LogError(ex); } }
public rosh_sendingSystems GetSandingSystem(int id) { var res = new rosh_sendingSystems(); try { res = db.GetSandingSystem(id); } catch (Exception ex) { _debug(ex, new { id }, ""); } return(res); }