public MStonesMod GetById(int id) { MStonesMod model = null; this.DataProvider.ExecuteCmd( "Stored_Procedure", inputParamMapper : delegate(SqlParameterCollection paramCol) { paramCol.AddWithValue("@Id", id); }, singleRecordMapper : delegate(IDataReader reader, short set) { model = Mapper(reader); } ); return(model); }
private MStonesMod Mapper(IDataReader reader) { MStonesMod model = new MStonesMod(); int index = 0; model.Id = reader.GetSafeInt32(index++); model.ProjectId = reader.GetSafeInt32(index++); model.Task = reader.GetSafeString(index++); model.Instruction = reader.GetSafeString(index++); model.CompletionGuidelines = reader.GetSafeString(index++); model.EstCompDate = reader.GetSafeString(index++); model.ProjstatusId = reader.GetSafeInt32(index++); model.Milestone = reader.GetSafeInt32(index++); model.DisplayOrder = reader.GetSafeInt32(index++); model.CreatedDate = reader.GetDateTime(index++); model.ModifiedDate = reader.GetDateTime(index++); model.ModifiedBy = reader.GetSafeString(index++); return(model); }