Ejemplo n.º 1
0
        public Group Add(Group group)
        {
            Group c = null;

            c = Transaction<Group, Group>(add, group);

            if (c != null)
                allGroups.Add(c);

            return c;
        }
Ejemplo n.º 2
0
 public Group Add(Group group)
 {
     return AddGroup().Add(group);
 }
Ejemplo n.º 3
0
 public int InsertGroup(Group group)
 {
     string values = group.Name + @"', '" + group.Description;
     return Insert("Group", "Name, Description", values);
 }
Ejemplo n.º 4
0
        public List<Group> SelectAllFromGroup()
        {
            List<Group> groups = new List<Group>();
            List<Dictionary<string, string>> list = null;

            list = SelectFrom("Group");

            foreach (var row in list)
            {
                Group group = new Group();
                group.Id = row["Id"].ToInt();
                group.Name = row["Name"];
                group.Description = row["Description"];

                groups.Add(group);
            }

            return groups;
        }
Ejemplo n.º 5
0
 private Group add(Connection connection, Group group)
 {
     group.Id = connection.InsertGroup(group);
     return group;
 }