Exemple #1
0
        private AttHackathonDomain Mapper(IDataReader reader, int index = 0)
        {
            AttHackathonDomain model = new AttHackathonDomain();

            model.Message = reader.GetSafeString(index++);
            return(model);
        }
Exemple #2
0
        public List <AttHackathonDomain> SelectAllByUsername(string username)
        {
            List <AttHackathonDomain> result = new List <AttHackathonDomain>();

            this._dataProvider.ExecuteCmd(
                "dbo.HackathonMessage_SelectByUsername",
                inputParamMapper : delegate(SqlParameterCollection paramCol)
            {
                paramCol.AddWithValue("@_Username", username);
            },
                singleRecordMapper : delegate(IDataReader reader, short set)
            {
                AttHackathonDomain model = new AttHackathonDomain();
                int index = 0;

                model = Mapper(reader, index);
                index++;
                result.Add(model);
            }
                );
            return(result);
        }