Beispiel #1
0
        public virtual (M, bool) GetWithConditionFist <M>(string condition, params string[] selectColumn) where M : class, new()
        {
            string cmtext = query.Condition <M>(condition, selectColumn);

            using (CommanderBase commander = DBContext.CreateCommander())
            {
                return(commander.ReaderFist <M>(cmtext));
            }
        }
Beispiel #2
0
        public virtual (M, bool) GetByColumNameFist <M>(string columName, object value, params string[] selectColumn) where M : class, new()
        {
            string cmtext = query.GetByColumName <M>(columName, selectColumn);

            using (CommanderBase commander = DBContext.CreateCommander())
            {
                return(commander.ReaderFist <M>(cmtext, new List <DbParameter>()
                {
                    commander.SetParametr(columName, value)
                }));
            }
        }