Esempio n. 1
0
        /// <summary>
        /// Configures the data context
        /// </summary>
        /// <param name="dataContext">Data context to configure</param>
        private void ConfigureDataContext(IDataContext dataContext)
        {
            AdditionalSchema.SetDataType(
                typeof(Guid),
                new SqlDataType(DataType.NChar, typeof(Guid), 36));

            AdditionalSchema.SetConvertExpression <string, Guid>(strGuid => new Guid(strGuid));
        }
Esempio n. 2
0
 /// <summary>
 /// Prepares the member level additional resource resolver with all of the additional schemas
 /// </summary>
 private void PrepareResourceResolver()
 {
     if (m_additionalSchemas != null)
     {
         m_additionalResourceResolver = new ResourceResolver();
         foreach (object additionalSchemaObject in m_additionalSchemas)
         {
             AdditionalSchema additionalSchema = additionalSchemaObject as AdditionalSchema;
             if (additionalSchema != null)
             {
                 m_additionalResourceResolver.AddResource(additionalSchema.Identifier, additionalSchema.Xsd);
             }
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Returns mapped entity descriptor.
 /// </summary>
 /// <typeparam name="TEntity">Entity type</typeparam>
 /// <returns>Mapping descriptor</returns>
 public EntityDescriptor GetEntityDescriptor <TEntity>() where TEntity : BaseEntity
 {
     return(AdditionalSchema?.GetEntityDescriptor(typeof(TEntity)));
 }