private List<HickoryIT.Shared.Data.Type> all(Connection connection) { if( allTypes == null ) { allTypes = connection.SelectAllFromType(); } return allTypes; }
private List<Property> all(Connection connection) { if (allProperties == null) { // We cache the categories allProperties = connection.SelectAllFromProperty(); } return allProperties; }
private List<Group> all(Connection connection) { if (allGroups == null) { // We cache the categories allGroups = connection.SelectAllFromGroup(); } return allGroups; }
public void ReturnConnection(Connection connection) { connection.Close(); lock (connections) { connections.Enqueue(connection); Monitor.Pulse(connections); } }
private List<Category> all(Connection connection) { if(allCategories==null) { // We cache the categories allCategories = connection.SelectAllFromCategory(); } return allCategories; }
private Resource addImage(Connection connection, Image image) { Resource resource = new Resource( new HickoryIT.Shared.Data.Type(null, "",""), "testname", "testdescription", "testvalue"); // TODO: Add the resource to DB connection.InsertResource(resource); // Get properties of image and add this/those Info inf = new Info(image); foreach (string propertyname in inf.PropertyItems.Keys) { Debug.WriteLine(propertyname + ": " + (inf.PropertyItems[propertyname]).ToString()); Console.WriteLine(propertyname + ": " + (inf.PropertyItems[propertyname]).ToString()); } // TODO: Save image to disc return resource; }
private Category add(Connection connection, Category category) { category.Id = connection.InsertCategory(category); return category; }
private Property add(Connection connection, Property property) { property.Id = connection.InsertProperty(property); return property; }
private HickoryIT.Shared.Data.Type add(Connection connection, HickoryIT.Shared.Data.Type type) { type.Id = connection.InsertType(type); return type; }
private Group add(Connection connection, Group group) { group.Id = connection.InsertGroup(group); return group; }