예제 #1
0
        public IEnumerable<Value> getValue()
        {
            Context dc = new Context();

            dc.Value.Add(new Value { ID = "1", Description = "Description01" });
            dc.Value.Add(new Value { ID = "2", Description = "Description02" });
            dc.Value.Add(new Value { ID = "3", Description = "Description03" });

            return dc.Value.Local;
        }
예제 #2
0
        public Value getValueByID(string id)
        {
            Context dc = new Context();

            dc.Value.Add(new Value { ID = "1", Description = "Description01" });
            dc.Value.Add(new Value { ID = "2", Description = "Description02" });
            dc.Value.Add(new Value { ID = "3", Description = "Description03" });

            return dc.Value.Find(id);
        }
예제 #3
0
        public IEnumerable<Value> deleteValue(string id)
        {
            Context dc = new Context();

            dc.Value.Add(new Value { ID = "1", Description = "Description01" });
            dc.Value.Add(new Value { ID = "2", Description = "Description02" });
            dc.Value.Add(new Value { ID = "3", Description = "Description03" });

            if (dc.Value.Find(id) != null)
              dc.Value.Remove(dc.Value.Find(id));

            return dc.Value.Local;
        }