public GetGPReceivedDetailsQM GetGPReceivedDetails() { var model = new GetGPReceivedDetailsQM(); using (var connection = new DbConnectionProvider().CreateConnection()) { connection.Open(); var command = new GetReceivedDetailsSelectCommand { Connection = connection }; model = command.Execute(); } return(model); }
public GetGPReceivedDetailsQM Execute() { var response = new GetGPReceivedDetailsQM(); using (var sqlCommand = CreateCommand()) { sqlCommand.Connection = Connection; sqlCommand.CommandText = "[dbo].[uspGetGPReceivingDetails]"; sqlCommand.CommandType = CommandType.StoredProcedure; using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand)) { response.GetGPReceivedDetailsModel = reader.ToList <GetGPReceivedDetailsModel>(); } } return(response); }