Exemplo n.º 1
0
        public FindCommandBuilder <T> AddCondition(Expression <Func <T, object> > property, string @operator, object value)
        {
            var map        = domainMap.GetMapFor <T>();
            var columnName = map.GetColumnNameForProperty(property);

            return(AddCondition(columnName, @operator, value));
        }
Exemplo n.º 2
0
        public void Done(IDomainMap domainMap)
        {
            Log.Debug("Setting list maps for entity '{0}'", EntityType.Name);
            var listMaps = propertyMaps.Where(x => x is IListPropertyMap <T>);

            foreach (IListPropertyMap <T> map in listMaps)
            {
                map.SetListMap(domainMap.GetMapFor(map.ItemTpye));
            }
        }
Exemplo n.º 3
0
 private void VisitMember(StringBuilder sql, MemberExpression expression, bool isOnRightSide)
 {
     if (isOnRightSide)
     {
         AppendRightSideMember(sql, expression);
     }
     else
     {
         var columnName = domainMap.GetMapFor <T>().GetColumnNameForProperty(expression);
         sql.Append(columnName);
     }
 }
Exemplo n.º 4
0
        public IList <T> List <T>(DbCommandSpec commandSpec) where T : class, IEntity, new()
        {
            var entityMap = domainMap.GetMapFor <T>();

            return(List(commandSpec).Select(x => entityMap.BuildFrom(x, this)).ToList());
        }