public static FluentMapper <TModel> Property <TModel, TProperty>(this FluentMapper <TModel> mapper, Expression <Func <TModel, TProperty> > action, string column, Func <object, object> fromDbConverter, Func <object, object> toDbConverter, bool primaryKey = false, bool readOnly = false) where TModel : class
        {
            var    expression = (MemberExpression)action.Body;
            string name       = expression.Member.Name;

            mapper.Mappings.Add(name, new FluentColumnMap(new ColumnInfo()
            {
                ColumnName = column, ResultColumn = readOnly
            }, fromDbConverter, toDbConverter));

            if (primaryKey)
            {
                if (!string.IsNullOrEmpty(mapper.TableInfo.PrimaryKey))
                {
                    mapper.TableInfo.PrimaryKey += ",";
                }
                mapper.TableInfo.PrimaryKey += column;
            }
            return(mapper);
        }
        public static FluentMapper <TModel> TableName <TModel>(this FluentMapper <TModel> mapper, string tableName)
        {
            mapper.TableInfo.TableName = mapper.GetTablePrefix() + tableName;

            return(mapper);
        }
 public static FluentMapper <TModel> Scope <TModel>(this FluentMapper <TModel> mapper, string scope)
 {
     mapper.Scope = scope;
     return(mapper);
 }
 public static FluentMapper <TModel> Property <TModel, TProperty>(this FluentMapper <TModel> mapper, Expression <Func <TModel, TProperty> > action, string column, Func <object, object> fromDbConverter, bool primaryKey = false, bool readOnly = false) where TModel : class
 {
     return(mapper.Property(action, column, fromDbConverter, null, primaryKey, readOnly));
 }