public UserViewGateway(string rootNamespace, string providerType, View view)
     : base(rootNamespace, providerType, view)
 {
     this.SUBCLASS_NAME = "IGateway";
 }
        private string GenerateViewDataGatewayUserClass(string projectNamespace, string projectDirectory, string providerType, View view)
        {
            string fullFileName;
            string fileContents;
            string errorMessage;
            string includeFile;

            try
            {

                UserViewGateway userGateway =
                    new UserViewGateway(projectNamespace, providerType, view);

                fullFileName = projectDirectory + "UserGateway\\Views\\" + userGateway.CLASS_NAME + ".cs";

                if (!File.Exists(fullFileName))
                {

                    fileContents = userGateway.ToString();

                    File.WriteAllText(fullFileName, fileContents);

                }

                includeFile = "\t\t<Compile Include=\"UserGateway\\Views\\" + userGateway.CLASS_NAME + ".cs" + "\" />";

            }
            catch (Exception exp)
            {
                errorMessage = "Error while creating the user file for table - " + view.Name + Environment.NewLine;
                errorMessage += "Internal error message:\n";
                errorMessage += exp.Message;

                throw new Exception(errorMessage, exp);
            }

            return includeFile;
        }
 public GeneratedViewGateway(string rootNamespace, string providerType, View view)
     : base(rootNamespace, providerType, view)
 {
     this.SUBCLASS_NAME = "IGateway<#CLASS_NAME_PREFIX#DataObject,int>";
 }
        private string GenerateViewDataEntityGeneratedClass(string projectNamespace, string projectDirectory, string providerType, View view)
        {
            string fullFileName;
            string fileContents;
            string errorMessage;
            string includeFile;

            try
            {

                GeneratedViewDataObject dataObjectGenerator = new GeneratedViewDataObject(projectNamespace, providerType, view);

                fullFileName = projectDirectory + "GeneratedClasses\\DataObject\\" + dataObjectGenerator.CLASS_NAME + "_Generated.cs";

                fileContents = dataObjectGenerator.ToString();
                File.WriteAllText(fullFileName, fileContents);

                includeFile = "\t\t<Compile Include=\"GeneratedClasses\\DataObject\\" + dataObjectGenerator.CLASS_NAME + "_Generated.cs" + "\" />";

            }
            catch (Exception exp)
            {
                errorMessage = "Error while creating the data object file for table - " + view.Name + Environment.NewLine;
                errorMessage += "Internal error message:\n";
                errorMessage += exp.Message;

                throw new Exception(errorMessage, exp);
            }

            return includeFile;
        }
 public GeneratedViewDataObject(string rootNamespace, string providerType, View view)
     : base(rootNamespace, providerType, view)
 {
     this.SUBCLASS_NAME = "I#CLASS_NAME#, IFieldValues";
 }