Exemple #1
0
        public void addNew(Ac4y _Ac4y)
        {
            using (var ctx = new AllContext(baseName))
            {
                ctx.Ac4ys.Add(_Ac4y);

                ctx.SaveChanges();
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            using (var ctx = new Ac4yContext())
            {
                var a = new Ac4y();

                ctx.Ac4ys.Add(a);
                ctx.SaveChanges();
            }
        }
Exemple #3
0
        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);
        }