Example #1
0
        internal EntityCommandInsert(EntityDatabaseWriter Writer, Entity Entity, string FirstQuery, string ParameterDefinition, string ParameterValue, string SecondQuery = null) : base(Writer, Entity)
        {
            first_query          = FirstQuery ?? throw new ArgumentNullException($"Create EntityCommand For {Entity} Failed, FirstQuery Is Null");
            parameter_definition = ParameterDefinition ?? throw new ArgumentNullException($"Create EntityCommand For {Entity} Failed, ParameterDefinition Is Null");
            parameter_value      = ParameterValue ?? throw new ArgumentNullException($"Create EntityCommand For {Entity} Failed, ParameterValue Is Null");

            second_query = SecondQuery;
        }
Example #2
0
        internal EntityCommandDelete(EntityDatabaseWriter Writer, Entity Entity, string Text) : base(Writer, Entity)
        {
            if (string.IsNullOrWhiteSpace(Text))
            {
                throw new ArgumentNullException($"Create EntityCommand For {Entity} Failed, Text Is Null Or Empty");
            }

            text = Text;
        }
Example #3
0
 private protected EntityCommand(EntityDatabaseWriter Writer, Entity Entity)
 {
     entity = Entity ?? throw new ArgumentNullException($"Create EntityCommand Failed, Entity Is Null");
     writer = Writer ?? throw new ArgumentNullException($"Create EntityCommand For {Entity} Failed, Writer Is Null");
 }