public GetScMasterQM GetScMaster() { GetScMasterQM getScMasterQM = new GetScMasterQM(); using (var connection = new DbConnectionProvider().CreateConnection()) { connection.Open(); var command = new GetScMasterSelectCommand { Connection = connection }; getScMasterQM = command.Execute(); } return(getScMasterQM); }
public GetScMasterQM Execute() { var response = new GetScMasterQM(); using (var sqlCommand = CreateCommand()) { sqlCommand.Connection = Connection; sqlCommand.CommandText = "[dbo].[uspGetSCMaster]"; sqlCommand.CommandType = CommandType.StoredProcedure; using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand)) { response.GetScMasterModelList = reader.ToList <GetScMasterModel>(); } } return(response); }