public Mikhailova_docTypes GetDocType(int id) { var res = new Mikhailova_docTypes(); res = db.GetDocType(id); return(res); }
public int SaveDocType(Mikhailova_docTypes item) { try { if (item.id == 0) { db.Mikhailova_docTypes.Add(item); db.SaveChanges(); } else { try { db.Entry(item).State = EntityState.Modified; db.SaveChanges(); } catch (OptimisticConcurrencyException ex) { RDL.Debug.LogError(ex); } } } catch (Exception ex) { RDL.Debug.LogError(ex); } return(item.id); }
public void SaveDocType(Mikhailova_docTypes item) { try { db.SaveDocType(item); } catch (Exception ex) { RDL.Debug.LogError(ex); } }
public void SaveDocType(Mikhailova_docTypes item) { try { _db.SaveDocType(item); } catch (Exception ex) { _debug(ex, new { item }, ""); } }
public Mikhailova_docTypes GetDocType(int id) { var res = new Mikhailova_docTypes(); try { res = _db.GetDocTypes().FirstOrDefault(x => x.id == id); } catch (Exception ex) { _debug(ex, new { id }, ""); } return(res); }
public int SaveDocType(Mikhailova_docTypes element, bool withSave = true) { if (element.id == 0) { db.Mikhailova_docTypes.Add(element); } else { db.Entry(element).State = EntityState.Modified; } if (withSave) { Save(); } return(element.id); }