public GetWorkOrderTypeQM GetWorkOrderType() { var model = new GetWorkOrderTypeQM(); using (var connection = new DbConnectionProvider().CreateConnection()) { connection.Open(); var command = new WorkOrderTypeSelectCommand { Connection = connection }; model = command.Execute(); } return(model); }
public GetWorkOrderTypeQM Execute() { var response = new GetWorkOrderTypeQM(); using (var sqlCommand = CreateCommand()) { sqlCommand.Connection = Connection; sqlCommand.CommandText = "[dbo].[uspGetWorkOrderType]"; sqlCommand.CommandType = CommandType.StoredProcedure; using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand)) { response.workOrderTypeModelList = reader.ToList <WorkOrderTypeModel>(); } } return(response); }