public int SaveFinType(fin_types item) { try { if (item.id == 0) { db.fin_types.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 fin_types GetFinType(int id) { var res = new fin_types(); res = db.GetFinType(id); return(res); }
public void SaveFinType(fin_types item) { try { db.SaveFinType(item); } catch (Exception ex) { RDL.Debug.LogError(ex); } }
public fin_types GetFinType(int id) { fin_types res = db.fin_types.FirstOrDefault(x => x.id == id); return(res); }