anchor.diff:  let private toCamelCase (str : string) =
       Regex.Replace(str, @"^\p{Lu}+", fun m -> m.Value.ToLowerInvariant())
   
  +type private KeyType() =
  +    [<ComponentModel.DataAnnotations.Key>]
  +    member __.DummyKeyProperty = 0
  +    static member AttributeData =
  +        CustomAttributeData.GetCustomAttributes(typeof<KeyType>.GetProperty("DummyKey"))
  +        |> Seq.find (fun a -> a.AttributeType = typeof<ComponentModel.DataAnnotations.KeyAttribute>)
  +
   let rec private generateRowTypeFromColumns (model : UserModel) name (columnMap : CompileTimeColumnMap) =
       let ty =
           ProvidedTypeDefinition
  
positive.code:             , IsErased = false
              )
      let fields = ResizeArray()
      let addField name fieldTy =
          let camel = toCamelCase name
          let field = ProvidedField("_" + camel, fieldTy)
          field.SetFieldAttributes(FieldAttributes.Private)
          let getter = ProvidedProperty(name, fieldTy)
          getter.GetterCode <-
              function | [ this ] -> Expr.FieldGet(this, field) | _ -> failwith "Invalid getter argument list"
          ty.AddMembers [ field :> MemberInfo; getter :> _ ]
          fields.Add(camel, field)
      for KeyValue(name, (_, column)) in columnMap.Columns do
          addField name <| model.Backend.MapPrimitiveType(column.ColumnType)
      for KeyValue(name, subMap) in columnMap.SubMaps do
          let subTy = generateRowTypeFromColumns model name subMap
          ty.AddMember(subTy)
          addField name subTy
      let ctorParams = [ for camel, field in fields -> ProvidedParameter(camel, field.FieldType) ]
      let ctor = ProvidedConstructor(ctorParams)
      ctor.InvokeCode <-
  
negative.code:     ty
  
  let private generateRowType (name : string) (model : UserModel) (query : SchemaQuery) =
      CompileTimeColumnMap.Parse(query.Columns)
      |> generateRowTypeFromColumns model name
  
  let generateType generate =
      let baseType = typeof<obj> // TODO pick base command type based on result sets
  