private void LazyLoadAttributesFromDatabaseToModel(RelationObject relationObject, RelationsModel relationModel) { IList<AttributesModel> attributesModelList = new List<AttributesModel>(); foreach (AttributeObject attributeObject in relationObject.RelationAttributes) { AttributesModel attributeModelToAddToList = new AttributesModel(); attributeModelToAddToList.Name = attributeObject.Name; attributeModelToAddToList.Type = attributeObject.Type; attributeModelToAddToList.Size = attributeObject.Size; attributesModelList.Add(attributeModelToAddToList); } relationModel.RelationAttributes = attributesModelList; }
private AttributesModel LoadAttributeModelOfTupleCellObjectFromDatabaseForView(TupleCellObject tupleCellObject) { AttributesModel attrModel = new AttributesModel(); attrModel.Name = tupleCellObject.AttributeAssociatedWithCell.Name; attrModel.Size = tupleCellObject.AttributeAssociatedWithCell.Size; attrModel.Type = tupleCellObject.AttributeAssociatedWithCell.Type; return attrModel; }