Exemplo n.º 1
0
        public void Delete(int id)
        {
            bonuszContext context  = new bonuszContext();
            var           törlendő = (from x in context.Gondolas
                                      where x.Id == id
                                      select x).FirstOrDefault();

            context.Remove(törlendő);
            context.SaveChanges();
        }
Exemplo n.º 2
0
        public void Post([FromBody] Gondola kText)
        {
            bonuszContext context = new bonuszContext();

            context.Gondolas.Add(kText);
            //  Gondola uj = new Gondola();
            // uj.Gondolat = bontott[1].ToString();
            // uj.Ido = DateTime.Now;

            context.SaveChanges();
        }