public int UpdateOrderReturnDetail(OrderReturnDetails orderReturnDetail)
        {
            string sql = @"UPDATE [OrderReturnDetails] SET [OrderId] = @OrderId, 
       [ProductId] = @ProductId, [Quantity] = @Quantity, [CGST] = @CGST, [SGST] = @SGST, 
       [IGST] = @IGST, [Discount] = @Discount, [NetPrice] = @NetPrice, [OrderReturnGroup] = @OrderReturnGroup, 
       [OrderReturnElementCode] = @OrderReturnElementCode, [Comments] = @Comments, [LastUpdatedById] = @LastUpdatedById, [LastUpdatedDate] = @LastUpdatedDate WHERE [Id] = @Id";

            var id = db.Connection.Query <int>(sql, orderReturnDetail).FirstOrDefault();

            return(id);
        }
        public int InsertOrderReturnDetail(OrderReturnDetails orderReturnDetail)
        {
            string sql = @"INSERT INTO [OrderReturnDetails]
           ([OrderId],[ProductId],[Quantity],[CGST],[SGST],[IGST],[Discount],[NetPrice],
		    [OrderReturnGroup],[OrderReturnElementCode],[Comments], [CreatedById], [CreatedDate], [LastUpdatedById], [LastUpdatedDate])
           VALUES 
           (@OrderId, @ProductId, @Quantity, @CGST, @SGST, @IGST, @Discount, @NetPrice, 
		    @OrderReturnGroup, @OrderReturnElementCode, @Comments, @CreatedById, @CreatedDate, @LastUpdatedById, @LastUpdatedDate) ; SELECT CAST(SCOPE_IDENTITY() as int)"        ;

            var id = db.Connection.Query <int>(sql, orderReturnDetail).FirstOrDefault();

            return(id);
        }