예제 #1
0
        public void Post([FromBody] OrdogTabla ujOrdog)
        {
            OrdogContext context = new OrdogContext();

            context.OrdogTablas.Add(ujOrdog);
            context.SaveChanges();
        }
예제 #2
0
        public void Delete(string nev)
        {
            OrdogContext context       = new OrdogContext();
            var          torlendoOrdog = (from x in context.OrdogTablas
                                          where x.Nev == nev
                                          select x).FirstOrDefault();

            context.Remove(torlendoOrdog);
            context.SaveChanges();
        }