Exemplo n.º 1
0
        /// <summary>
        /// Writes data provider methods definition for the specified table.
        /// </summary>
        /// <param name="table">The table to write methods for.</param>
        public void WriteTableDataProviderImplementation(TableInfo table)
        {
            MethodSignature signature = MethodSignature.GetCreateSignature(table);
            IMethodBuilder  builder   = new CreateMethodBuilder(table);

            WrapMethodBody(signature, builder);

            signature = MethodSignature.GetUpdateSignature(table);
            builder   = new UpdateMethodBuilder(table);
            WrapMethodBody(signature, builder);

            signature = MethodSignature.GetDeleteSignature(table);
            builder   = new DeleteMethodBuilder(table);
            WrapMethodBody(signature, builder);

            signature = MethodSignature.GetReadSignature(table);
            builder   = new ReadMethodBuilder(table);
            WrapMethodBody(signature, builder);
        }
        /// <summary>
        /// Writes data provider methods definition for the specified table.
        /// </summary>
        /// <param name="table">The table to write methods for.</param>
        public void WriteTableDataProviderImplementation(TableInfo table)
        {
            MethodSignature signature = MethodSignature.GetCreateSignature(table);
            IMethodBuilder builder = new CreateMethodBuilder(table);
            WrapMethodBody(signature, builder);

            signature = MethodSignature.GetUpdateSignature(table);
            builder = new UpdateMethodBuilder(table);
            WrapMethodBody(signature, builder);

            signature = MethodSignature.GetDeleteSignature(table);
            builder = new DeleteMethodBuilder(table);
            WrapMethodBody(signature, builder);

            signature = MethodSignature.GetReadSignature(table);
            builder = new ReadMethodBuilder(table);
            WrapMethodBody(signature, builder);
        }