anchor.diff:      | EdmType.String -> builder typeof<string>
       | _ -> builder typeof<obj>
   
  -let buildParameter name buildType = ProvidedParameter(name, buildType)
  -
   /// Sets the properties on a specific entity based on the inferred schema from the sample provided
   let setPropertiesForEntity (entityType : ProvidedTypeDefinition) (sampleEntities : #seq<DynamicTableEntity>) = 
  -    let properties = sampleEntities |> getDistinctProperties
  +    let properties = sampleEntities |> Seq.map getPropsForEntity |> getDistinctProperties
       entityType.AddMembersDelayed(fun _ -> 
           properties
           |> Seq.map (fun (name, edmType, need) -> 
  
positive.code:                | _ -> buildEntityProperty<obj> name need)
          |> Seq.toList)
      
      entityType.AddMemberDelayed(fun () -> 
          let parameters = 
              [ ProvidedParameter("PartitionKey", typeof<Partition>)
                ProvidedParameter("RowKey", typeof<Row>) ] 
              @ [ for (name, edmType, need) in properties -> buildEdmParameter edmType (buildParameter name) ]
          ProvidedConstructor(
              parameters, 
              InvokeCode = fun args -> 
                  let fieldNames = 
                      properties
                      |> Seq.map(fun (name, _, _) -> name)
                      |> Seq.toList                
                  let fieldValues = 
                      args
                      |> Seq.skip 2
                      |> Seq.map (fun arg -> Expr.Coerce(arg, typeof<obj>))
                      |> Seq.toList                
                  <@@ buildTableEntity (%%args.[0] : Partition) (%%args.[1] : Row) fieldNames (%%(Expr.NewArray(typeof<obj>, fieldValues))) @@>))
      properties
  
  
negative.code: open ProviderImplementation.ProvidedTypes
  open System
  
  let private getPropsForEntity (entity:DynamicTableEntity) =
      entity.Properties
      |> Seq.filter(fun p -> p.Value.PropertyAsObject <> null)
      |> Seq.map(fun p -> p.Key, p.Value.PropertyType)
      |> Set
  
  let private getDistinctProperties tableEntities = 
      let optionalProperties, mandatoryProperties, _ =
          ((Set [], Set [], true), tableEntities)
          ||> Seq.fold(fun (optionals, mandatory, initialRun) entity ->
              if initialRun then
                  optionals, entity, false
  