Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EntityMapping"/> class.
 /// </summary>
 /// <param name="type">Type.</param>
 /// <param name="parentMapping">Parent mapping.</param>
 public EntityMapping(string type, Mapping parentMapping)
 {
     _Type = type;
     _Ids = new PrimaryKeyMappingCollection();
     _Attributes = new AttributeMappingCollection();
     _Attributes.TypeName = type;
     _References = new ReferenceMappingCollection();
     _ParentMapping = parentMapping;
 }
Ejemplo n.º 2
0
        private string GetWhereId(PrimaryKeyMappingCollection pkms)
        {
            string[] contraints = new string[pkms.Count];
            for (int i = 0; i < pkms.Count; i++)
            {
                contraints[i] = String.Concat(
                    _Dialect.FormatAttribute(pkms[i].Field),
                    " = ",
                    _Driver.FormatParameter("Id" + i.ToString()));
            }

            return String.Concat("( ", String.Join(" AND ", contraints), " )");
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EntityMapping"/> class.
 /// </summary>
 public EntityMapping()
 {
     _Ids = new PrimaryKeyMappingCollection();
     _Attributes = new AttributeMappingCollection();
     _References = new ReferenceMappingCollection();
 }