Пример #1
0
 public void Add(Location location)
 {
     if (location == null)
     {
         throw new NullReferenceException();
     }
     _ctx.Add(location);
     _ctx.SaveChanges();
 }
        public void Add(Location location)
        {
            if (location == null)
            {
                throw new NullReferenceException();
            }

            //Your looking for a table with the type location,
            //find the correct dbset
            _ctx.Add(location);
        }