Exemplo n.º 1
0
        public Property FindOne(string id)
        {
            PropertyJoined query = Join().Where(q => q.Property.ID == id).FirstOrDefault();

            Property property = computeFields(query);

            return(property);
        }
Exemplo n.º 2
0
        public Property computeFields(PropertyJoined query)
        {
            Property property = query.Property;

            property.leasedBy     = query.Occupant;
            property.bedroomCount = query.Property.bedrooms.Count();
            property.sizeBedrooms = query.Property.bedrooms.Sum();
            return(property);
        }