public void addNew(Ac4y _Ac4y) { using (var ctx = new AllContext(baseName)) { ctx.Ac4ys.Add(_Ac4y); ctx.SaveChanges(); } }
static void Main(string[] args) { using (var ctx = new Ac4yContext()) { var a = new Ac4y(); ctx.Ac4ys.Add(a); ctx.SaveChanges(); } }
public Ac4y findFirstById(Int32 id) { Ac4y a = null; using (var ctx = new AllContext(baseName)) { var query = ctx.Ac4ys .Where(ss => ss.id == id) .FirstOrDefault <Ac4y>(); a = query; } return(a); }